Author: shawkins
Date: 2012-01-25 16:10:12 -0500 (Wed, 25 Jan 2012)
New Revision: 3822
Modified:
branches/7.7.x/engine/src/test/java/org/teiid/dqp/internal/process/TestDQPCore.java
Log:
fix for threading issue with the unit test
Modified:
branches/7.7.x/engine/src/test/java/org/teiid/dqp/internal/process/TestDQPCore.java
===================================================================
---
branches/7.7.x/engine/src/test/java/org/teiid/dqp/internal/process/TestDQPCore.java 2012-01-25
18:40:44 UTC (rev 3821)
+++
branches/7.7.x/engine/src/test/java/org/teiid/dqp/internal/process/TestDQPCore.java 2012-01-25
21:10:12 UTC (rev 3822)
@@ -375,6 +375,11 @@
assertNull(rm.getException());
assertEquals(10, rm.getResultsList().size());
RequestWorkItem item =
core.getRequestWorkItem(DQPWorkContext.getWorkContext().getRequestID(reqMsg.getExecutionId()));
+ synchronized (item) {
+ while (item.isProcessing()) {
+ Thread.sleep(10);
+ }
+ }
assertEquals(10, item.resultsBuffer.getRowCount());
}