embulk-filter-speedometer 0.3.1 → 0.3.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8b34d1dc9dc74d1b823018a0b69e4f31465df617
4
- data.tar.gz: efb4575ac811267c0bf70101252293e6ce061cb5
3
+ metadata.gz: 958b4d942aed7b7887b9e1ef551eff708fc6c772
4
+ data.tar.gz: 494333e5bdf90fe38a4b4cb2bfe51d3fd4243ae7
5
5
  SHA512:
6
- metadata.gz: 27b149f6be1961a37ef6120aa892b605dc1a99790bab45f40c03b7ca43bdb4acda4790b0a2eb218f3ab523ed0e32cd3584c4918690268c2d570b41dad1f26224
7
- data.tar.gz: 65c229df6124ddba77c84b65be36cbf1b67cc701f17e333f8c03180cdf762bbf349fe4bf41e6a1fa734812a618529ff38dd16d069c5ec6257b04818715f505d2
6
+ metadata.gz: a079f858ae03565450f89bfcb549da32cdc4ee0decbb132ae711a9a48e99b8a084f92ad22f02843d57324879ba17863ebb5db643acd681d626f610ebc9385716
7
+ data.tar.gz: 61c318a6d621d39f54a4493e7113d94dd273c7bb417a01bcd91e91945cdad10f54fddbdbe40fafaac1c3aece860fe6ecd7c7fdbe084fcf5be8dd335815dd6e7c
data/.travis.yml CHANGED
@@ -1,3 +1,3 @@
1
1
  language: java
2
- script: ./gradlew -DenableIntegrationTest=true gem
3
-
2
+ script: ./gradlew --info -DenableIntegrationTest=true gem
3
+ after_failure: "ls -al /home/travis/build/hata/embulk-filter-speedometer/build/tmp/integrationTest/embulk/; cat /home/travis/build/hata/embulk-filter-speedometer/build/tmp/integrationTest/embulk/config_big.yml.run.log"
data/build.gradle CHANGED
@@ -18,7 +18,7 @@ configurations {
18
18
  provided
19
19
  }
20
20
 
21
- version = "0.3.1"
21
+ version = "0.3.2"
22
22
 
23
23
  dependencies {
24
24
  compile "org.embulk:embulk-core:0.6.17+"
@@ -5,6 +5,7 @@ import static org.junit.Assert.assertTrue;
5
5
 
6
6
  import java.io.BufferedReader;
7
7
  import java.io.File;
8
+ import java.io.FilenameFilter;
8
9
  import java.io.FileInputStream;
9
10
  import java.io.FileReader;
10
11
  import java.io.InputStreamReader;
@@ -29,12 +30,12 @@ public class TestSingleRun {
29
30
 
30
31
  @Test
31
32
  public void testValidateMinOutputFile() throws Exception {
32
- validateResultFiles("min_01.csv.gz", "result_min_000.00.csv", "result_min_001.00.csv");
33
+ validateResultFiles("min_01.csv.gz", "result_min_");
33
34
  }
34
35
 
35
36
  @Test
36
37
  public void testValidateBigOutputFile() throws Exception {
37
- validateResultFiles("big_01.csv.gz", "result_big_000.00.csv", "result_big_001.00.csv");
38
+ validateResultFiles("big_01.csv.gz", "result_big_");
38
39
  }
39
40
 
40
41
  @Test
@@ -62,7 +63,7 @@ public class TestSingleRun {
62
63
  assertTrue("Verify there are speedometer log lines.", found);
63
64
  }
64
65
 
65
- private void validateResultFiles(String gzipSrcFile, String... resultFiles) throws Exception {
66
+ private void validateResultFiles(String gzipSrcFile, final String prefix) throws Exception {
66
67
  ArrayList inList = new ArrayList();
67
68
  ArrayList outList = new ArrayList();
68
69
 
@@ -76,6 +77,14 @@ public class TestSingleRun {
76
77
  }
77
78
  }
78
79
 
80
+ // In travis env, there are many cpus and it may be different from
81
+ // my local environment. From this, list all files using File.list method.
82
+ String[] resultFiles = new File(TEST_DIR).list(new FilenameFilter() {
83
+ public boolean accept(File dir, String name) {
84
+ return name.startsWith(prefix) && name.endsWith(".csv");
85
+ }
86
+ });
87
+
79
88
  for (String resultFile : resultFiles) {
80
89
  try (BufferedReader reader = new BufferedReader(new FileReader(getTestFile(resultFile)))) {
81
90
  String line = reader.readLine(); // Discard a header line
@@ -90,6 +99,7 @@ public class TestSingleRun {
90
99
  Collections.sort(inList);
91
100
  Collections.sort(outList);
92
101
 
93
- assertEquals("Verify input and output lines are identical.", inList, outList);
102
+ assertEquals("Verify input and output lines are identical. in:" +
103
+ inList.size() + ", out:" + outList.size(), inList.toString(), outList.toString());
94
104
  }
95
105
  }
@@ -89,7 +89,6 @@ public class SpeedometerFilterPlugin
89
89
  private final SpeedometerSpeedController controller;
90
90
  private final Schema schema;
91
91
  private final TimestampFormatter[] timestampFormatters;
92
- private final PageOutput pageOutput;
93
92
  private final PageReader pageReader;
94
93
  private final BufferAllocator allocator;
95
94
  private final int delimiterLength;
@@ -99,7 +98,6 @@ public class SpeedometerFilterPlugin
99
98
  SpeedControlPageOutput(PluginTask task, Schema schema, PageOutput pageOutput) {
100
99
  this.controller = new SpeedometerSpeedController(task, SpeedometerSpeedAggregator.getInstance());
101
100
  this.schema = schema;
102
- this.pageOutput = pageOutput;
103
101
  this.allocator = task.getBufferAllocator();
104
102
  this.delimiterLength = task.getDelimiter().length();
105
103
  this.recordPaddingSize = task.getRecordPaddingSize();
@@ -130,7 +128,6 @@ public class SpeedometerFilterPlugin
130
128
  controller.stop();
131
129
  pageBuilder.close();
132
130
  pageReader.close();
133
- pageOutput.close();
134
131
  }
135
132
 
136
133
  class ColumnVisitorImpl implements ColumnVisitor {
@@ -109,7 +109,6 @@ public class TestSpeedometerFilterPlugin
109
109
  taskSource.loadTask(PluginTask.class); times = 1;
110
110
  builder.close(); times = 1;
111
111
  reader.close(); times = 1;
112
- inPageOutput.close(); times = 1;
113
112
  }};
114
113
  }
115
114
  }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: embulk-filter-speedometer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - hata
@@ -68,7 +68,7 @@ files:
68
68
  - src/test/java/org/embulk/filter/TestSpeedometerSpeedAggregator.java
69
69
  - src/test/java/org/embulk/filter/TestSpeedometerSpeedController.java
70
70
  - src/test/java/org/embulk/filter/TestSpeedometerUtil.java
71
- - classpath/embulk-filter-speedometer-0.3.1.jar
71
+ - classpath/embulk-filter-speedometer-0.3.2.jar
72
72
  homepage: https://github.com/hata/embulk-filter-speedometer
73
73
  licenses:
74
74
  - MIT