Skip to content

Commit 212ac34

Browse files
author
cogmission
committed
Add wait time to offset thread handling within JUnit
1 parent b91eae1 commit 212ac34

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/test/java/org/numenta/nupic/network/NetworkTest.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -450,7 +450,11 @@ public void onNext(Inference inf) {
450450
});
451451

452452
network.halt();
453-
try { network.lookup("r1").lookup("1").getLayerThread().join(3000); }catch(Exception e) { e.printStackTrace(); }
453+
try {
454+
network.lookup("r1").lookup("1").getLayerThread().join(3000);
455+
// Add a little more wait time
456+
Thread.sleep(3000);
457+
}catch(Exception e) { e.printStackTrace(); }
454458
network.restart();
455459

456460
Publisher newPub = network.getPublisher();

0 commit comments

Comments
 (0)