Skip to content
This repository has been archived by the owner on Jun 16, 2023. It is now read-only.

Commit

Permalink
fix run multiple integrate test
Browse files Browse the repository at this point in the history
  • Loading branch information
Longda-Feng committed Mar 8, 2016
1 parent 83a51aa commit 3931d6d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
2 changes: 2 additions & 0 deletions jstorm-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<!--<forkCount>1</forkCount>-->
<forkMode>pertest</forkMode>
<argLine>-Xms1024m -Xmx4096m</argLine>
</configuration>
</plugin>
Expand Down
2 changes: 2 additions & 0 deletions jstorm-core/src/main/java/backtype/storm/LocalCluster.java
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,8 @@ public void shutdown() {
JStormUtils.sleepMs(10 * 1000);
this.state.clean();
instance = null;
//wait 10 second to exit to make run multiple junit test
JStormUtils.sleepMs(10 * 1000);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -277,13 +277,14 @@ public void test_transaction_word() {

cluster.submitTopology("top-n-topology", config, builder.buildTopology());

JStormUtils.sleepMs(100 * 1000);
JStormUtils.sleepMs(60 * 1000);


assertEquals(false, outOfOrder.get() );
assertNotSame(0, receiveCounter1.get());
assertNotSame(0, receiveCounter2.get());

cluster.killTopology("top-n-topology");
cluster.shutdown();
} catch (Exception e) {
Assert.fail("Failed to run simple transaction");
Expand Down

0 comments on commit 3931d6d

Please sign in to comment.