Author: jm
Date: 2012-04-10 14:05:39 -0700 (Tue, 10 Apr 2012)
New Revision: 28784
Modified:
core3/impl/trunk/model-impl/impl/src/test/java/org/cytoscape/model/internal/LongTHashTest.java
Log:
References #853: Added disabled test case that reproduces deadlock
Modified:
core3/impl/trunk/model-impl/impl/src/test/java/org/cytoscape/model/internal/LongTHashTest.java
===================================================================
---
core3/impl/trunk/model-impl/impl/src/test/java/org/cytoscape/model/internal/LongTHashTest.java
2012-04-10 20:04:21 UTC (rev 28783)
+++
core3/impl/trunk/model-impl/impl/src/test/java/org/cytoscape/model/internal/LongTHashTest.java
2012-04-10 21:05:39 UTC (rev 28784)
@@ -1,6 +1,8 @@
package org.cytoscape.model.internal;
+import java.lang.Thread.State;
+
import org.junit.Before;
import org.junit.Test;
import static org.junit.Assert.*;
@@ -107,4 +109,24 @@
hash.put(10L, "A");
hash.put(11L, "A");
}
+
+// @Test
+ public void testTicket853() throws InterruptedException {
+ Thread thread = new Thread(new Runnable() {
+ @Override
+ public void run() {
+ int size = 6;
+ LongTHash<Integer> hash = new
LongTHash<Integer>(Integer.class);
+ for (int i = 0; i < size; i++) {
+ hash.put((long) i, i);
+ }
+ for (int i = size; i < (size * 2); i++) {
+ hash.remove((long) i);
+ }
+ }
+ });
+ thread.start();
+ thread.join(2000);
+ assertEquals(State.TERMINATED, thread.getState());
+ }
}
--
You received this message because you are subscribed to the Google Groups
"cytoscape-cvs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/cytoscape-cvs?hl=en.