abdullah alamoudi has submitted this change and it was merged. Change subject: Fix testScanUnion() to wait in close() until every input calls writer.open(). ......................................................................
Fix testScanUnion() to wait in close() until every input calls writer.open(). Change-Id: I8d4ead7a2a70c4287509f5f25f90534f56960035 Reviewed-on: https://asterix-gerrit.ics.uci.edu/1683 Sonar-Qube: Jenkins <[email protected]> Tested-by: Jenkins <[email protected]> BAD: Jenkins <[email protected]> Integration-Tests: Jenkins <[email protected]> Reviewed-by: abdullah alamoudi <[email protected]> --- M hyracks-fullstack/hyracks/hyracks-examples/hyracks-integration-tests/src/test/java/org/apache/hyracks/tests/rewriting/SuperActivityRewritingTest.java 1 file changed, 9 insertions(+), 2 deletions(-) Approvals: abdullah alamoudi: Looks good to me, approved Jenkins: Verified; No violations found; No violations found; Verified diff --git a/hyracks-fullstack/hyracks/hyracks-examples/hyracks-integration-tests/src/test/java/org/apache/hyracks/tests/rewriting/SuperActivityRewritingTest.java b/hyracks-fullstack/hyracks/hyracks-examples/hyracks-integration-tests/src/test/java/org/apache/hyracks/tests/rewriting/SuperActivityRewritingTest.java index 683857f..8b0b8a0 100644 --- a/hyracks-fullstack/hyracks/hyracks-examples/hyracks-integration-tests/src/test/java/org/apache/hyracks/tests/rewriting/SuperActivityRewritingTest.java +++ b/hyracks-fullstack/hyracks/hyracks-examples/hyracks-integration-tests/src/test/java/org/apache/hyracks/tests/rewriting/SuperActivityRewritingTest.java @@ -21,6 +21,7 @@ import java.nio.ByteBuffer; import java.util.HashSet; import java.util.Set; +import java.util.concurrent.CountDownLatch; import org.apache.hyracks.api.comm.IFrameWriter; import org.apache.hyracks.api.constraints.PartitionConstraintHelper; @@ -124,7 +125,8 @@ IRecordDescriptorProvider recordDescProvider, int partition, int nPartitions) throws HyracksDataException { return new IOperatorNodePushable() { - private Set<Long> threads = new HashSet<Long>(); + private CountDownLatch allOpenedSignal = new CountDownLatch(3); + private Set<Long> threads = new HashSet<>(); @Override public void initialize() throws HyracksDataException { @@ -154,6 +156,7 @@ return new IFrameWriter() { @Override public void open() throws HyracksDataException { + allOpenedSignal.countDown(); synchronized (threads) { threads.add(Thread.currentThread().getId()); } @@ -171,7 +174,11 @@ @Override public void close() throws HyracksDataException { - + try { + allOpenedSignal.await(); + } catch (InterruptedException e) { + // This test should not be interrupted + } } @Override -- To view, visit https://asterix-gerrit.ics.uci.edu/1683 To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings Gerrit-MessageType: merged Gerrit-Change-Id: I8d4ead7a2a70c4287509f5f25f90534f56960035 Gerrit-PatchSet: 2 Gerrit-Project: asterixdb Gerrit-Branch: master Gerrit-Owner: Yingyi Bu <[email protected]> Gerrit-Reviewer: Jenkins <[email protected]> Gerrit-Reviewer: abdullah alamoudi <[email protected]>
