Kaydet (Commit) e9d055bf authored tarafından Stephan Bergmann's avatar Stephan Bergmann

Do not lose AssertionError from sub-threads

Change-Id: I8ca7194be6d22b72b73e76e5067273090b087b96
üst bd2f71fc
...@@ -69,6 +69,8 @@ public class RowSet extends TestCase ...@@ -69,6 +69,8 @@ public class RowSet extends TestCase
XPropertySet m_rowSetProperties; XPropertySet m_rowSetProperties;
XParametersSupplier m_paramsSupplier; XParametersSupplier m_paramsSupplier;
private final Object failedResultSetMovementStressGuard = new Object();
private String failedResultSetMovementStressMessages = "";
private class ResultSetMovementStress implements Runnable private class ResultSetMovementStress implements Runnable
{ {
...@@ -100,7 +102,12 @@ public class RowSet extends TestCase ...@@ -100,7 +102,12 @@ public class RowSet extends TestCase
} }
catch (Exception e) catch (Exception e)
{ {
fail("ResultSetMovementStress(" + m_id + ") failed at i=" + i + ": " + e); synchronized (failedResultSetMovementStressGuard) {
failedResultSetMovementStressMessages
= failedResultSetMovementStressMessages
+ "ResultSetMovementStress(" + m_id + ") failed at i="
+ i + ": " + e + "\n";
}
} }
} }
} }
...@@ -383,6 +390,9 @@ public class RowSet extends TestCase ...@@ -383,6 +390,9 @@ public class RowSet extends TestCase
{ {
threads[i].join(); threads[i].join();
} }
synchronized (failedResultSetMovementStressGuard) {
assertEquals("", failedResultSetMovementStressMessages);
}
} }
catch (Exception e) catch (Exception e)
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment