X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-clustering-commons%2Fsrc%2Ftest%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fcluster%2Fio%2FChunkedOutputStreamTest.java;fp=opendaylight%2Fmd-sal%2Fsal-distributed-datastore%2Fsrc%2Ftest%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fcluster%2Fdatastore%2Fpersisted%2FChunkedOutputStreamTest.java;h=56c78f1c70207e2c7833c7ee9b09c9adf2a4342c;hp=16f7bd830b46e5907dc2ea0a51dbdebc485b68fc;hb=88d921169a0ccd41339e5409bbe8e7db18597609;hpb=255e74efd633f2fbca7ce4f1372004d93cc81a10 diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/persisted/ChunkedOutputStreamTest.java b/opendaylight/md-sal/sal-clustering-commons/src/test/java/org/opendaylight/controller/cluster/io/ChunkedOutputStreamTest.java similarity index 94% rename from opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/persisted/ChunkedOutputStreamTest.java rename to opendaylight/md-sal/sal-clustering-commons/src/test/java/org/opendaylight/controller/cluster/io/ChunkedOutputStreamTest.java index 16f7bd830b..56c78f1c70 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/persisted/ChunkedOutputStreamTest.java +++ b/opendaylight/md-sal/sal-clustering-commons/src/test/java/org/opendaylight/controller/cluster/io/ChunkedOutputStreamTest.java @@ -5,7 +5,7 @@ * terms of the Eclipse Public License v1.0 which accompanies this distribution, * and is available at http://www.eclipse.org/legal/epl-v10.html */ -package org.opendaylight.controller.cluster.datastore.persisted; +package org.opendaylight.controller.cluster.io; import static org.junit.Assert.assertArrayEquals; import static org.junit.Assert.assertEquals; @@ -16,8 +16,9 @@ import org.junit.Test; public class ChunkedOutputStreamTest { private static final int INITIAL_SIZE = 256; + private static final int MAX_ARRAY_SIZE = 256 * 1024; - private final ChunkedOutputStream stream = new ChunkedOutputStream(INITIAL_SIZE); + private final ChunkedOutputStream stream = new ChunkedOutputStream(INITIAL_SIZE, MAX_ARRAY_SIZE); @Test public void testBasicWrite() throws IOException { @@ -63,7 +64,7 @@ public class ChunkedOutputStreamTest { @Test public void testTwoChunksWrite() throws IOException { - int size = ChunkedOutputStream.MAX_ARRAY_SIZE + 1; + int size = MAX_ARRAY_SIZE + 1; for (int i = 0; i < size; ++i) { stream.write(i); }