summaryrefslogtreecommitdiff
path: root/src/test/java/com/keuin/kbackupfabric/backup/incremental/ObjectCollectionSerializerTest.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/java/com/keuin/kbackupfabric/backup/incremental/ObjectCollectionSerializerTest.java')
-rw-r--r--src/test/java/com/keuin/kbackupfabric/backup/incremental/ObjectCollectionSerializerTest.java24
1 files changed, 22 insertions, 2 deletions
diff --git a/src/test/java/com/keuin/kbackupfabric/backup/incremental/ObjectCollectionSerializerTest.java b/src/test/java/com/keuin/kbackupfabric/backup/incremental/ObjectCollectionSerializerTest.java
index bd25215..33f5a9c 100644
--- a/src/test/java/com/keuin/kbackupfabric/backup/incremental/ObjectCollectionSerializerTest.java
+++ b/src/test/java/com/keuin/kbackupfabric/backup/incremental/ObjectCollectionSerializerTest.java
@@ -10,10 +10,30 @@ import java.nio.file.Files;
import static org.junit.Assert.assertEquals;
public class ObjectCollectionSerializerTest {
+
+ @Test
+ public void testSerializationConsistency1() throws IOException {
+ testSerializationConsistency(1);
+ }
+
+ @Test
+ public void testSerializationConsistency2() throws IOException {
+ testSerializationConsistency(2);
+ }
+
+ @Test
+ public void testSerializationConsistency4() throws IOException {
+ testSerializationConsistency(4);
+ }
+
@Test
- public void testSerializationConsistency() throws IOException {
+ public void testSerializationConsistency8() throws IOException {
+ testSerializationConsistency(8);
+ }
+
+ public void testSerializationConsistency(int threads) throws IOException {
ObjectCollectionFactory<Sha256Identifier> factory =
- new ObjectCollectionFactory<>(Sha256Identifier.getFactory());
+ new ObjectCollectionFactory<>(Sha256Identifier.getFactory(), threads);
ObjectCollection collection =
factory.fromDirectory(new File("./testfile/ObjectCollectionFactoryTest"));
File file = new File("./testfile/serialized");