Skip to content

Commit 4320315

Browse files
committed
fix tests
1 parent 1a692fc commit 4320315

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

server/src/test/java/org/elasticsearch/index/mapper/vectors/SparseVectorFieldMapperTests.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
import org.apache.lucene.search.IndexSearcher;
1818
import org.apache.lucene.store.Directory;
1919
import org.apache.lucene.tests.index.RandomIndexWriter;
20+
import org.elasticsearch.common.Randomness;
2021
import org.elasticsearch.common.Strings;
2122
import org.elasticsearch.common.compress.CompressedXContent;
2223
import org.elasticsearch.index.IndexVersion;
@@ -135,7 +136,7 @@ public void testDefaults() throws Exception {
135136

136137
public void testDefaultsPreIndexOptions() throws Exception {
137138
IndexVersion indexVersion = IndexVersionUtils.randomVersionBetween(
138-
new Random(),
139+
Randomness.get(),
139140
NEW_SPARSE_VECTOR_INDEX_VERSION,
140141
IndexVersionUtils.getPreviousVersion(SPARSE_VECTOR_PRUNING_INDEX_OPTIONS_VERSION)
141142
);

0 commit comments

Comments
 (0)