Skip to content

Commit 59cfad1

Browse files
committed
test: simplify test fixture
1 parent f419efe commit 59cfad1

1 file changed

Lines changed: 5 additions & 6 deletions

File tree

src/it/java/io/weaviate/ConcurrentTest.java

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,11 @@
22

33
import java.util.Random;
44
import java.util.UUID;
5-
import java.util.stream.IntStream;
65

76
import org.apache.commons.lang3.RandomStringUtils;
87
import org.junit.Rule;
98
import org.junit.rules.TestName;
109

11-
import com.google.common.primitives.Floats;
12-
1310
/**
1411
* ConcurrentTest is the base class for integration tests, which provides
1512
* utility methods to uniqualize collections and objects created in the
@@ -59,8 +56,10 @@ protected static String randomUUID() {
5956
* @return
6057
*/
6158
protected static float[] randomVector(int length, float origin, float bound) {
62-
return Floats.toArray(IntStream.range(0, length)
63-
.<Float>mapToObj(f -> rand.nextFloat(origin, bound))
64-
.toList());
59+
var vector = new float[length];
60+
for (var i = 0; i < length; i++) {
61+
vector[i] = rand.nextFloat(origin, bound);
62+
}
63+
return vector;
6564
}
6665
}

0 commit comments

Comments
 (0)