]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - tests/org.simantics.db.tests/src/org/simantics/db/tests/api/request/misc/RequestProcessorTest1.java
Multiple reader thread support for db client
[simantics/platform.git] / tests / org.simantics.db.tests / src / org / simantics / db / tests / api / request / misc / RequestProcessorTest1.java
index be32a81fb98078d81661aaa8f94bc24ff0f6ffed..4466f733d8fa128cc2034d3c1087642f418113ed 100644 (file)
@@ -17,7 +17,7 @@ import org.simantics.db.AsyncReadGraph;
 import org.simantics.db.ReadGraph;
 import org.simantics.db.Resource;
 import org.simantics.db.common.procedure.adapter.ListenerAdapter;
-import org.simantics.db.common.request.ReadRequest;
+import org.simantics.db.common.request.AsyncReadRequest;
 import org.simantics.db.common.request.ResourceAsyncRead;
 import org.simantics.db.common.request.ResourceRead;
 import org.simantics.db.common.request.UnaryAsyncRead;
@@ -104,6 +104,11 @@ public class RequestProcessorTest1 extends WriteReadTest {
                                listeners.add(result);
                        }
                        
+                       @Override
+                       public boolean isDisposed() {
+                               return false;
+                       }
+                       
                };
                
                assertEquals(Layer0.URIs.ConsistsOf, graph.sync(new R1(L0.ConsistsOf)));
@@ -112,10 +117,10 @@ public class RequestProcessorTest1 extends WriteReadTest {
                assertEquals(Layer0.URIs.ConsistsOf, graph.sync(new R4(L0.ConsistsOf)));
                assertEquals("http:/", graph.sync(new R5()));
 
-               graph.sync(new ReadRequest() {
+               graph.syncRequest(new AsyncReadRequest() {
 
                        @Override
-                       public void run(ReadGraph graph) throws DatabaseException {
+                       public void run(AsyncReadGraph graph) {
                                
                                graph.async(new R1(L0.ConsistsOf), listener);
                                graph.async(new R2(L0.ConsistsOf), listener);