Search in sources :

Example 6 with NetworkRequestPackage

use of org.bboxdb.network.packages.NetworkRequestPackage in project bboxdb by jnidzwetzki.

the class TestTupleListFuture method testRejectedExeption.

@Test(expected = RejectedException.class)
public void testRejectedExeption() throws InterruptedException, RejectedException {
    final TupleListFutureStore tupleListFutureStore = new TupleListFutureStore();
    tupleListFutureStore.shutdown();
    final BBoxDBConnection connection = Mockito.mock(BBoxDBConnection.class);
    final Supplier<NetworkRequestPackage> supplier = () -> (null);
    final NetworkOperationFuture networkOperationFuture = new NetworkOperationFuture(connection, supplier);
    tupleListFutureStore.put(new TupleListFuture(networkOperationFuture, new DoNothingDuplicateResolver(), ""));
}
Also used : NetworkRequestPackage(org.bboxdb.network.packages.NetworkRequestPackage) TupleListFuture(org.bboxdb.network.client.future.TupleListFuture) NetworkOperationFuture(org.bboxdb.network.client.future.NetworkOperationFuture) DoNothingDuplicateResolver(org.bboxdb.storage.sstable.duplicateresolver.DoNothingDuplicateResolver) BBoxDBConnection(org.bboxdb.network.client.BBoxDBConnection) TupleListFutureStore(org.bboxdb.network.client.tools.TupleListFutureStore) Test(org.junit.Test)

Aggregations

NetworkRequestPackage (org.bboxdb.network.packages.NetworkRequestPackage)6 IOException (java.io.IOException)3 BBoxDBConnection (org.bboxdb.network.client.BBoxDBConnection)3 PackageEncodeException (org.bboxdb.network.packages.PackageEncodeException)3 ByteArrayOutputStream (java.io.ByteArrayOutputStream)2 ArrayList (java.util.ArrayList)2 NetworkOperationFuture (org.bboxdb.network.client.future.NetworkOperationFuture)2 CompressionEnvelopeRequest (org.bboxdb.network.packages.request.CompressionEnvelopeRequest)2 OutputStream (java.io.OutputStream)1 ByteBuffer (java.nio.ByteBuffer)1 Arrays (java.util.Arrays)1 List (java.util.List)1 Objects (java.util.Objects)1 Collectors (java.util.stream.Collectors)1 GZIPOutputStream (java.util.zip.GZIPOutputStream)1 NetworkConst (org.bboxdb.network.NetworkConst)1 BBoxDBClient (org.bboxdb.network.client.BBoxDBClient)1 TupleListFuture (org.bboxdb.network.client.future.TupleListFuture)1 TupleListFutureStore (org.bboxdb.network.client.tools.TupleListFutureStore)1 InsertTupleRequest (org.bboxdb.network.packages.request.InsertTupleRequest)1