Skip to content

Commit 9903d95

Browse files
committed
test(batch): simplify integration test setup
1 parent 72f3d33 commit 9903d95

1 file changed

Lines changed: 2 additions & 10 deletions

File tree

src/it/java/io/weaviate/integration/BatchITest.java

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,13 @@
11
package io.weaviate.integration;
22

33
import java.io.IOException;
4-
import java.util.Map;
5-
import java.util.UUID;
64

75
import org.assertj.core.api.Assertions;
86
import org.junit.BeforeClass;
97
import org.junit.Test;
108

119
import io.weaviate.ConcurrentTest;
1210
import io.weaviate.client6.v1.api.WeaviateClient;
13-
import io.weaviate.client6.v1.api.collections.Property;
1411
import io.weaviate.client6.v1.api.collections.WeaviateObject;
1512
import io.weaviate.containers.Container;
1613
import io.weaviate.containers.Weaviate;
@@ -27,17 +24,12 @@ public static void __() {
2724
public void test10_000Objects() throws IOException {
2825
var nsThings = ns("Things");
2926

30-
var things = client.collections.create(
31-
nsThings,
32-
c -> c.properties(Property.text("letter")));
27+
var things = client.collections.create(nsThings);
3328

3429
// Act
3530
try (var batch = things.batch.start()) {
3631
for (int i = 0; i < 10_000; i++) {
37-
String uuid = UUID.randomUUID().toString();
38-
batch.add(WeaviateObject.of(builder -> builder
39-
.uuid(uuid)
40-
.properties(Map.of("letter", uuid.substring(0, 1)))));
32+
batch.add(WeaviateObject.of());
4133
}
4234
} catch (InterruptedException e) {
4335
}

0 commit comments

Comments
 (0)