Skip to content

Commit 72ce05f

Browse files
committed
RDBC-959: test enable by version annotation
1 parent 36b9414 commit 72ce05f

File tree

7 files changed

+130
-162
lines changed

7 files changed

+130
-162
lines changed

src/test/java/net/ravendb/client/documents/queries/vectorSearch/VectorSearchTest.java

Lines changed: 8 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
import net.ravendb.client.documents.session.IDocumentSession;
1010
import net.ravendb.client.documents.indexes.IndexType;
1111
import com.google.common.collect.Sets;
12-
import net.ravendb.client.infrastructure.EnableOn70Server;
12+
import net.ravendb.client.infrastructure.EnableOnServer;
1313
import org.junit.jupiter.api.Test;
1414

1515
import java.util.Collections;
@@ -20,7 +20,7 @@
2020
import static org.junit.jupiter.api.Assertions.assertEquals;
2121
import static org.assertj.core.api.Assertions.assertThat;
2222

23-
23+
@EnableOnServer(thresholdVersion = "7.1")
2424
public class VectorSearchTest extends RemoteTestBase {
2525

2626
public static class User {
@@ -55,7 +55,6 @@ public void setAge(int age) {
5555
public void setEmbedding(Float[] embedding) {this.embedding = embedding;}
5656
}
5757

58-
@EnableOn70Server
5958
@Test
6059
public void shouldReturnDocsWithVectorSearchAPI(){
6160
try (IDocumentStore store = getDocumentStore()) {
@@ -82,7 +81,6 @@ public void shouldReturnDocsWithVectorSearchAPI(){
8281
}
8382
}
8483

85-
@EnableOn70Server
8684
@Test
8785
public void shouldReturnDocsWithVectorSearchAsRQL(){
8886
try (IDocumentStore store = getDocumentStore()) {
@@ -115,7 +113,6 @@ public void shouldReturnDocsWithVectorSearchAsRQL(){
115113
}
116114
}
117115

118-
@EnableOn70Server
119116
@Test
120117
public void shouldGenerateRqlForVectorSearchWithInt8QuantizedEmbeddingField() {
121118
Float[] arr = new Float[]{2.5f, 3.3f};
@@ -138,7 +135,6 @@ public void shouldGenerateRqlForVectorSearchWithInt8QuantizedEmbeddingField() {
138135
}
139136
}
140137

141-
@EnableOn70Server
142138
@Test
143139
public void shouldGenerateRqlForVectorSearchWithTextEmbeddingUsingAiTask() {
144140
try (IDocumentStore store = getDocumentStore()) {
@@ -160,7 +156,6 @@ public void shouldGenerateRqlForVectorSearchWithTextEmbeddingUsingAiTask() {
160156
}
161157
}
162158

163-
@EnableOn70Server
164159
@Test
165160
public void shouldGenerateRqlForBasicVectorSearchWithNumericEmbeddingValues() {
166161
Float[] arr = new Float[]{2.5f, 3.3f};
@@ -185,7 +180,6 @@ public void shouldGenerateRqlForBasicVectorSearchWithNumericEmbeddingValues() {
185180
}
186181
}
187182

188-
@EnableOn70Server
189183
@Test
190184
public void shouldGenerateRqlForVectorSearchWithBase64EncodedEmbedding() {
191185
try (IDocumentStore store = getDocumentStore()) {
@@ -208,7 +202,6 @@ public void shouldGenerateRqlForVectorSearchWithBase64EncodedEmbedding() {
208202
}
209203
}
210204

211-
@EnableOn70Server
212205
@Test
213206
public void shouldGenerateRqlForVectorSearchWithTextFieldAndInt8Quantization() {
214207
try (IDocumentStore store = getDocumentStore();
@@ -231,7 +224,6 @@ public void shouldGenerateRqlForVectorSearchWithTextFieldAndInt8Quantization() {
231224
}
232225
}
233226

234-
@EnableOn70Server
235227
@Test
236228
public void shouldGenerateRqlForVectorSearchUsingPropertySelectorForEmbeddingField() {
237229
try (IDocumentStore store = getDocumentStore();
@@ -254,7 +246,6 @@ public void shouldGenerateRqlForVectorSearchUsingPropertySelectorForEmbeddingFie
254246
}
255247
}
256248

257-
@EnableOn70Server
258249
@Test
259250
public void shouldGenerateRqlForVectorSearchWithPropertySelectorAndExplicitInt8Quantization() {
260251
try (IDocumentStore store = getDocumentStore();
@@ -277,7 +268,6 @@ public void shouldGenerateRqlForVectorSearchWithPropertySelectorAndExplicitInt8Q
277268
}
278269
}
279270

280-
@EnableOn70Server
281271
@Test
282272
public void shouldGenerateRqlForVectorSearchWithPropertySelectorAndExplicitBinaryQuantization() {
283273
try (IDocumentStore store = getDocumentStore();
@@ -300,7 +290,6 @@ public void shouldGenerateRqlForVectorSearchWithPropertySelectorAndExplicitBinar
300290
}
301291
}
302292

303-
@EnableOn70Server
304293
@Test
305294
public void shouldGenerateRqlForVectorSearchWithPropertySelectorForTextFieldConversion() {
306295
try (IDocumentStore store = getDocumentStore();
@@ -323,7 +312,6 @@ public void shouldGenerateRqlForVectorSearchWithPropertySelectorForTextFieldConv
323312
}
324313
}
325314

326-
@EnableOn70Server
327315
@Test
328316
public void shouldGenerateRqlForVectorSearchWithTextFieldUsingNamedAiTask() {
329317
try (IDocumentStore store = getDocumentStore();
@@ -347,7 +335,6 @@ public void shouldGenerateRqlForVectorSearchWithTextFieldUsingNamedAiTask() {
347335
}
348336
}
349337

350-
@EnableOn70Server
351338
@Test
352339
public void shouldGenerateRqlForVectorSearchWithBase64FieldUsingPropertySelector() {
353340
try (IDocumentStore store = getDocumentStore();
@@ -370,7 +357,6 @@ public void shouldGenerateRqlForVectorSearchWithBase64FieldUsingPropertySelector
370357
}
371358
}
372359

373-
@EnableOn70Server
374360
@Test
375361
public void shouldGenerateRqlForVectorSearchWithSingleToInt8ConversionQuantization() {
376362
try (IDocumentStore store = getDocumentStore();
@@ -394,7 +380,6 @@ public void shouldGenerateRqlForVectorSearchWithSingleToInt8ConversionQuantizati
394380
}
395381
}
396382

397-
@EnableOn70Server
398383
@Test
399384
public void shouldGenerateRqlForVectorSearchWithSingleToBinaryConversionQuantization() {
400385
try (IDocumentStore store = getDocumentStore();
@@ -418,7 +403,6 @@ public void shouldGenerateRqlForVectorSearchWithSingleToBinaryConversionQuantiza
418403
}
419404
}
420405

421-
@EnableOn70Server
422406
@Test
423407
public void shouldGenerateRqlForVectorSearchWithTextFieldAndInt8TargetQuantization() {
424408
try (IDocumentStore store = getDocumentStore();
@@ -442,7 +426,6 @@ public void shouldGenerateRqlForVectorSearchWithTextFieldAndInt8TargetQuantizati
442426
}
443427
}
444428

445-
@EnableOn70Server
446429
@Test
447430
public void shouldGenerateRqlForVectorSearchWithTextAiTaskAndBinaryQuantization() {
448431
try (IDocumentStore store = getDocumentStore();
@@ -467,7 +450,6 @@ public void shouldGenerateRqlForVectorSearchWithTextAiTaskAndBinaryQuantization(
467450
}
468451
}
469452

470-
@EnableOn70Server
471453
@Test
472454
public void shouldGenerateRqlForVectorSearchWithWithFieldMethodAndPropertySelector() {
473455
try (IDocumentStore store = getDocumentStore();
@@ -490,7 +472,6 @@ public void shouldGenerateRqlForVectorSearchWithWithFieldMethodAndPropertySelect
490472
}
491473
}
492474

493-
@EnableOn70Server
494475
@Test
495476
public void shouldGenerateRqlForVectorSearchWithExactMatchingParameter() {
496477
try (IDocumentStore store = getDocumentStore();
@@ -513,7 +494,6 @@ public void shouldGenerateRqlForVectorSearchWithExactMatchingParameter() {
513494
}
514495
}
515496

516-
@EnableOn70Server
517497
@Test
518498
public void shouldGenerateRqlForVectorSearchWithSimilarityCandidatesAndExactParameters() {
519499
try (IDocumentStore store = getDocumentStore();
@@ -536,7 +516,6 @@ public void shouldGenerateRqlForVectorSearchWithSimilarityCandidatesAndExactPara
536516
}
537517
}
538518

539-
@EnableOn70Server
540519
@Test
541520
public void shouldGenerateRqlForVectorSearchWithExactParameterAndEmbeddingField() {
542521
try (IDocumentStore store = getDocumentStore();
@@ -559,7 +538,6 @@ public void shouldGenerateRqlForVectorSearchWithExactParameterAndEmbeddingField(
559538
}
560539
}
561540

562-
@EnableOn70Server
563541
@Test
564542
public void shouldGenerateRqlForVectorSearchWithExactParameterAndTextEmbeddingWithSimilarity() {
565543
try (IDocumentStore store = getDocumentStore();
@@ -582,7 +560,6 @@ public void shouldGenerateRqlForVectorSearchWithExactParameterAndTextEmbeddingWi
582560
}
583561
}
584562

585-
@EnableOn70Server
586563
@Test
587564
public void shouldGenerateRqlForVectorSearchWithMultipleTextQueriesAsInput() {
588565
try (IDocumentStore store = getDocumentStore();
@@ -605,7 +582,6 @@ public void shouldGenerateRqlForVectorSearchWithMultipleTextQueriesAsInput() {
605582
}
606583
}
607584

608-
@EnableOn70Server
609585
@Test
610586
public void shouldGenerateRqlForVectorSearchWithMultipleEmbeddingVectorsAsInput() {
611587
try (IDocumentStore store = getDocumentStore();
@@ -631,7 +607,6 @@ public void shouldGenerateRqlForVectorSearchWithMultipleEmbeddingVectorsAsInput(
631607
}
632608
}
633609

634-
@EnableOn70Server
635610
@Test
636611
public void shouldGenerateRqlForVectorSearchWithMultipleEmbeddingsAndInt8Quantization() {
637612
try (IDocumentStore store = getDocumentStore();
@@ -658,7 +633,6 @@ public void shouldGenerateRqlForVectorSearchWithMultipleEmbeddingsAndInt8Quantiz
658633
}
659634
}
660635

661-
@EnableOn70Server
662636
@Test
663637
public void shouldGenerateRqlForVectorSearchWithMultipleTextsAiTaskAndBinaryQuantization() {
664638
try (IDocumentStore store = getDocumentStore();
@@ -683,8 +657,6 @@ public void shouldGenerateRqlForVectorSearchWithMultipleTextsAiTaskAndBinaryQuan
683657
}
684658
}
685659

686-
687-
@EnableOn70Server
688660
@Test
689661
public void shouldCreateIndexDefinitionWithVectorSearchFieldAndProperConfiguration() {
690662
try (IDocumentStore store = getDocumentStore()) {
@@ -712,7 +684,6 @@ public void shouldCreateIndexDefinitionWithVectorSearchFieldAndProperConfigurati
712684
}
713685
}
714686

715-
@EnableOn70Server
716687
@Test
717688
public void shouldCreateIndexWithVectorSearchConfigurationUsingClassBasedDefinition() {
718689
try (IDocumentStore store = getDocumentStore()) {
@@ -738,7 +709,6 @@ public void shouldCreateIndexWithVectorSearchConfigurationUsingClassBasedDefinit
738709
}
739710
}
740711

741-
@EnableOn70Server
742712
@Test
743713
public void shouldGenerateRqlForVectorSearchUsingForDocumentWithTextField() {
744714
try (IDocumentStore store = getDocumentStore()) {
@@ -760,7 +730,6 @@ public void shouldGenerateRqlForVectorSearchUsingForDocumentWithTextField() {
760730
}
761731
}
762732

763-
@EnableOn70Server
764733
@Test
765734
public void shouldGenerateRqlForVectorSearchUsingForDocumentWithInt8Quantization() {
766735
try (IDocumentStore store = getDocumentStore()) {
@@ -781,7 +750,6 @@ public void shouldGenerateRqlForVectorSearchUsingForDocumentWithInt8Quantization
781750
}
782751
}
783752

784-
@EnableOn70Server
785753
@Test
786754
public void shouldGenerateRqlForVectorSearchUsingForDocumentWithTextFieldAndAITask() {
787755
try (IDocumentStore store = getDocumentStore()) {
@@ -804,7 +772,6 @@ public void shouldGenerateRqlForVectorSearchUsingForDocumentWithTextFieldAndAITa
804772
}
805773
}
806774

807-
@EnableOn70Server
808775
@Test
809776
public void shouldGenerateRqlForVectorSearchWithFieldAndByTextWithGenerationTaskIdentifier(){
810777
try (IDocumentStore store = getDocumentStore()) {
@@ -822,7 +789,6 @@ public void shouldGenerateRqlForVectorSearchWithFieldAndByTextWithGenerationTask
822789
}
823790
}
824791

825-
@EnableOn70Server
826792
@Test
827793
public void shouldGenerateRqlForVectorSearchWithFieldAndByTextsWithGenerationTaskIdentifier(){
828794
try (IDocumentStore store = getDocumentStore()) {
@@ -840,7 +806,6 @@ public void shouldGenerateRqlForVectorSearchWithFieldAndByTextsWithGenerationTas
840806
}
841807
}
842808

843-
@EnableOn70Server
844809
@Test
845810
void testSetVectorFieldStrings() {
846811
TestIndexDefinitionBuilder builder = new TestIndexDefinitionBuilder("TestIndex");
@@ -851,7 +816,6 @@ void testSetVectorFieldStrings() {
851816
assertEquals(vectorFields, builder.getVectorFieldStrings());
852817
}
853818

854-
@EnableOn70Server
855819
@Test
856820
public void shouldGenerateRqlForVectorSearchUsingForDocumentWithSimilarityAndCandidates() {
857821
try (IDocumentStore store = getDocumentStore()) {
@@ -874,7 +838,6 @@ public void shouldGenerateRqlForVectorSearchUsingForDocumentWithSimilarityAndCan
874838
}
875839
}
876840

877-
@EnableOn70Server
878841
@Test
879842
public void shouldGenerateRqlForVectorSearchUsingForDocumentWithNumberOfCandidates() {
880843
try (IDocumentStore store = getDocumentStore()) {
@@ -898,7 +861,7 @@ public void shouldGenerateRqlForVectorSearchUsingForDocumentWithNumberOfCandidat
898861
}
899862

900863
// Vector Search tests with String as parameter not a lambda
901-
// @EnableOn70Server
864+
//
902865
// @Test
903866
// public void shouldGenerateRqlForVectorSearchWithFieldNameAsString() {
904867
// VectorEmbeddingFieldValueFactory valueFactory = new VectorEmbeddingFieldValueFactory();
@@ -924,7 +887,7 @@ public void shouldGenerateRqlForVectorSearchUsingForDocumentWithNumberOfCandidat
924887
// }
925888
// }
926889

927-
// @EnableOn70Server
890+
//
928891
// @Test
929892
// public void shouldGenerateRqlForVectorSearchWithFieldNameAsStringAndOptions() {
930893
// VectorEmbeddingFieldValueFactory valueFactory = new VectorEmbeddingFieldValueFactory();
@@ -952,7 +915,7 @@ public void shouldGenerateRqlForVectorSearchUsingForDocumentWithNumberOfCandidat
952915
// }
953916
// }
954917

955-
// @EnableOn70Server
918+
//
956919
// @Test
957920
// public void shouldGenerateRqlForVectorSearchWithFieldNameAsStringAndExactParameter() {
958921
// VectorEmbeddingFieldValueFactory valueFactory = new VectorEmbeddingFieldValueFactory();
@@ -979,7 +942,7 @@ public void shouldGenerateRqlForVectorSearchUsingForDocumentWithNumberOfCandidat
979942
// }
980943
// }
981944
//
982-
// @EnableOn70Server
945+
//
983946
// @Test
984947
// public void shouldGenerateRqlForVectorSearchWithFieldNameAsStringAndMultipleEmbeddings() {
985948
// VectorEmbeddingFieldValueFactory valueFactory = new VectorEmbeddingFieldValueFactory();
@@ -1009,7 +972,7 @@ public void shouldGenerateRqlForVectorSearchUsingForDocumentWithNumberOfCandidat
1009972
// }
1010973
// }
1011974
//
1012-
// @EnableOn70Server
975+
//
1013976
// @Test
1014977
// public void shouldGenerateRqlForVectorSearchWithFieldNameAsStringAndByTextFactory() {
1015978
// VectorEmbeddingFieldValueFactory valueFactory = new VectorEmbeddingFieldValueFactory();
@@ -1035,7 +998,7 @@ public void shouldGenerateRqlForVectorSearchUsingForDocumentWithNumberOfCandidat
1035998
// }
1036999
// }
10371000
//
1038-
// @EnableOn70Server
1001+
//
10391002
// @Test
10401003
// public void shouldGenerateRqlForVectorSearchWithFieldNameAsStringAndForDocumentFactory() {
10411004
// VectorEmbeddingFieldValueFactory valueFactory = new VectorEmbeddingFieldValueFactory();

src/test/java/net/ravendb/client/infrastructure/EnableOn70ServerCondition.java

Lines changed: 0 additions & 22 deletions
This file was deleted.

0 commit comments

Comments
 (0)