Skip to content

Commit

Permalink
#32 add sieve3 step to basekbNowFlow
Browse files Browse the repository at this point in the history
  • Loading branch information
Paul Houle authored and Paul Houle committed Oct 10, 2013
1 parent 5d9c37b commit 0d96e1a
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,16 @@
</list>
</constructor-arg>
</bean>
<bean class="com.ontology2.haruhi.flows.JobStep">
<constructor-arg>
<list>
<value>'run'</value>
<value>'sieve3'</value>
<value>pos[2]+pos[1]+'/accepted/'</value>
<value>pos[2]+pos[1]+'/sieved/'</value>
</list>
</constructor-arg>
</bean>
</list>
</constructor-arg>
</bean>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public class TestFlowBeans {
List<String> flowArgs=Lists.newArrayList("s3n://freebase-dumps/","1942-12-07-00-00","s3n://basekb-now/");
List<FlowStep> steps=basekbNowFlow.generateSteps(flowArgs);
assertNotNull(steps);
assertEquals(2,steps.size());
assertEquals(3,steps.size());

{
assertTrue(steps.get(0) instanceof SpringStep);
Expand Down Expand Up @@ -55,5 +55,19 @@ public class TestFlowBeans {
assertEquals("/preprocessed/1942-12-07-00-00/",args.get(i++));
assertEquals("s3n://basekb-now/1942-12-07-00-00/",args.get(i++));
}

{
assertTrue(steps.get(2) instanceof SpringStep);
SpringStep step2=(SpringStep) steps.get(2);
List<String> args=step2.getStepArgs(flowArgs);

assertEquals(4,args.size());

int i=0;
assertEquals("run",args.get(i++));
assertEquals("sieve3",args.get(i++));
assertEquals("s3n://basekb-now/1942-12-07-00-00/accepted/",args.get(i++));
assertEquals("s3n://basekb-now/1942-12-07-00-00/sieved/",args.get(i++));
}
}
}

0 comments on commit 0d96e1a

Please sign in to comment.