Commit 554744bd authored by yu's avatar yu

Merge branch 'fixTheLastPath' into multiThread

fix the multi dir problem and single dir problem
parents 58d3b89e 996b5c7a
...@@ -77,7 +77,7 @@ public class TestFilenameInputPlugin ...@@ -77,7 +77,7 @@ public class TestFilenameInputPlugin
ConfigSource inConfig = embulk.newConfig() ConfigSource inConfig = embulk.newConfig()
.set("type","filename") .set("type","filename")
.set("multi_dir",multi_dir) .set("multi_dir",multi_dir)
.set("order_by_modified_time","2"); .set("load_order","ASCEND_MODIFIED");
Path tmp = embulk.createTempDir(); Path tmp = embulk.createTempDir();
...@@ -115,7 +115,7 @@ public class TestFilenameInputPlugin ...@@ -115,7 +115,7 @@ public class TestFilenameInputPlugin
//System.out.println("The actual" + actual); //System.out.println("The actual" + actual);
assertEquals(lines,actual); assertEquals(lines,actual);
inConfig.set("order_by_modified_time","1"); inConfig.set("load_order","DESCEND_MODIFIED");
res = embulk.runAllBuilder(execConfig,inConfig,outConfig); res = embulk.runAllBuilder(execConfig,inConfig,outConfig);
lines = Files.readAllLines(Paths.get(tmp.toString()+"/outputfile.txt")); lines = Files.readAllLines(Paths.get(tmp.toString()+"/outputfile.txt"));
...@@ -143,7 +143,7 @@ public class TestFilenameInputPlugin ...@@ -143,7 +143,7 @@ public class TestFilenameInputPlugin
ConfigSource inConfig = embulk.newConfig() ConfigSource inConfig = embulk.newConfig()
.set("type","filename") .set("type","filename")
.set("order_by_modified_time","2") .set("load_order","ASCEND_MODIFIED")
.set("multi_dir",multi_dir) .set("multi_dir",multi_dir)
.set("multi_tag",multi_tag); .set("multi_tag",multi_tag);
System.out.println(inConfig); System.out.println(inConfig);
...@@ -236,9 +236,8 @@ public class TestFilenameInputPlugin ...@@ -236,9 +236,8 @@ public class TestFilenameInputPlugin
ConfigSource inConfig = embulk.newConfig() ConfigSource inConfig = embulk.newConfig()
.set("type","filename") .set("type","filename")
.set("order_by_modified_time","2") .set("load_order","ASCEND_MODIFIED")
.set("multi_dir",multi_dir) .set("multi_dir",multi_dir);
.set("path_prefix","/home/chronos/user/Downloads/embulk-input-filename/src/test/resources/testDirList/example/example_");
Path tmp = embulk.createTempDir(); Path tmp = embulk.createTempDir();
ConfigSource outConfig = embulk.newConfig() ConfigSource outConfig = embulk.newConfig()
...@@ -310,9 +309,9 @@ public class TestFilenameInputPlugin ...@@ -310,9 +309,9 @@ public class TestFilenameInputPlugin
multi_dir.add(path_src.toAbsolutePath().toString()+"/test.csv"); multi_dir.add(path_src.toAbsolutePath().toString()+"/test.csv");
ConfigSource inConfig = embulk.newConfig() ConfigSource inConfig = embulk.newConfig()
.set("type","filename") .set("type","filename")
.set("multi_dir",multi_dir) .set("load_order","ALPHABETICAL")
.set("parser",embulk.newConfig().set("type","none-bin")); .set("multi_dir",multi_dir);
Path tmp = embulk.createTempDir(); Path tmp = embulk.createTempDir();
ConfigSource outConfig = embulk.newConfig() ConfigSource outConfig = embulk.newConfig()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment