aboutsummaryrefslogtreecommitdiffstats
path: root/config-model/src/test/java/com/yahoo/vespa/model/application/validation/change/search/AttributeChangeValidatorTest.java
diff options
context:
space:
mode:
Diffstat (limited to 'config-model/src/test/java/com/yahoo/vespa/model/application/validation/change/search/AttributeChangeValidatorTest.java')
-rw-r--r--config-model/src/test/java/com/yahoo/vespa/model/application/validation/change/search/AttributeChangeValidatorTest.java94
1 files changed, 47 insertions, 47 deletions
diff --git a/config-model/src/test/java/com/yahoo/vespa/model/application/validation/change/search/AttributeChangeValidatorTest.java b/config-model/src/test/java/com/yahoo/vespa/model/application/validation/change/search/AttributeChangeValidatorTest.java
index 8d6f05f40e7..076d78912e8 100644
--- a/config-model/src/test/java/com/yahoo/vespa/model/application/validation/change/search/AttributeChangeValidatorTest.java
+++ b/config-model/src/test/java/com/yahoo/vespa/model/application/validation/change/search/AttributeChangeValidatorTest.java
@@ -6,13 +6,13 @@ import com.yahoo.config.application.api.ValidationOverrides;
import com.yahoo.config.provision.ClusterSpec;
import com.yahoo.test.ManualClock;
import com.yahoo.vespa.model.application.validation.change.VespaConfigChangeAction;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
import java.util.List;
import static com.yahoo.vespa.model.application.validation.change.ConfigChangeTestUtils.newRestartAction;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
+import static org.junit.jupiter.api.Assertions.assertTrue;
+import static org.junit.jupiter.api.Assertions.fail;
public class AttributeChangeValidatorTest {
@@ -40,181 +40,181 @@ public class AttributeChangeValidatorTest {
}
@Test
- public void adding_attribute_aspect_require_restart() throws Exception {
+ void adding_attribute_aspect_require_restart() throws Exception {
Fixture f = new Fixture("field f1 type string { indexing: summary }",
"field f1 type string { indexing: attribute | summary }");
f.assertValidation(newRestartAction(ClusterSpec.Id.from("test"),
- "Field 'f1' changed: add attribute aspect"));
+ "Field 'f1' changed: add attribute aspect"));
}
@Test
- public void removing_attribute_aspect_require_restart() throws Exception {
+ void removing_attribute_aspect_require_restart() throws Exception {
Fixture f = new Fixture("field f1 type string { indexing: attribute | summary }",
"field f1 type string { indexing: summary }");
f.assertValidation(newRestartAction(ClusterSpec.Id.from("test"),
- "Field 'f1' changed: remove attribute aspect"));
+ "Field 'f1' changed: remove attribute aspect"));
}
@Test
- public void adding_attribute_field_is_ok() throws Exception {
+ void adding_attribute_field_is_ok() throws Exception {
Fixture f = new Fixture("", "field f1 type string { indexing: attribute | summary \n attribute: fast-search }");
f.assertValidation();
}
@Test
- public void removing_attribute_field_is_ok() throws Exception {
+ void removing_attribute_field_is_ok() throws Exception {
Fixture f = new Fixture("field f1 type string { indexing: attribute | summary }", "");
f.assertValidation();
}
@Test
- public void changing_fast_search_require_restart() throws Exception {
+ void changing_fast_search_require_restart() throws Exception {
new Fixture("field f1 type string { indexing: attribute }",
"field f1 type string { indexing: attribute \n attribute: fast-search }").
assertValidation(newRestartAction(ClusterSpec.Id.from("test"),
- "Field 'f1' changed: add attribute 'fast-search'"));
+ "Field 'f1' changed: add attribute 'fast-search'"));
}
@Test
- public void changing_fast_rank_require_restart() throws Exception {
+ void changing_fast_rank_require_restart() throws Exception {
new Fixture("field f1 type tensor(x{}) { indexing: attribute }",
"field f1 type tensor(x{}) { indexing: attribute \n attribute: fast-rank }").
assertValidation(newRestartAction(ClusterSpec.Id.from("test"),
- "Field 'f1' changed: add attribute 'fast-rank'"));
+ "Field 'f1' changed: add attribute 'fast-rank'"));
}
@Test
- public void changing_btree2hash_require_restart() throws Exception {
+ void changing_btree2hash_require_restart() throws Exception {
new Fixture("field f1 type long { indexing: attribute\n attribute: fast-search\n dictionary: btree}",
"field f1 type long { indexing: attribute\n attribute: fast-search\n dictionary: hash }").
assertValidation(newRestartAction(ClusterSpec.Id.from("test"),
- "Field 'f1' changed: change property 'dictionary: btree/hash' from 'BTREE' to 'HASH'"));
+ "Field 'f1' changed: change property 'dictionary: btree/hash' from 'BTREE' to 'HASH'"));
}
@Test
- public void changing_hash2btree_require_restart() throws Exception {
+ void changing_hash2btree_require_restart() throws Exception {
new Fixture("field f1 type long { indexing: attribute\n attribute: fast-search\n dictionary: hash}",
"field f1 type long { indexing: attribute\n attribute: fast-search\n dictionary: btree }").
assertValidation(newRestartAction(ClusterSpec.Id.from("test"),
- "Field 'f1' changed: change property 'dictionary: btree/hash' from 'HASH' to 'BTREE'"));
+ "Field 'f1' changed: change property 'dictionary: btree/hash' from 'HASH' to 'BTREE'"));
}
@Test
- public void changing_fast_access_require_restart() throws Exception {
+ void changing_fast_access_require_restart() throws Exception {
new Fixture("field f1 type string { indexing: attribute \n attribute: fast-access }",
"field f1 type string { indexing: attribute }").
assertValidation(newRestartAction(ClusterSpec.Id.from("test"),
- "Field 'f1' changed: remove attribute 'fast-access'"));
+ "Field 'f1' changed: remove attribute 'fast-access'"));
}
@Test
- public void changing_uncased2cased_require_restart() throws Exception {
+ void changing_uncased2cased_require_restart() throws Exception {
new Fixture("field f1 type string { indexing: attribute\n attribute: fast-search\n dictionary { btree\ncased}\nmatch:cased}",
"field f1 type string { indexing: attribute\n attribute: fast-search\n dictionary{ btree\nuncased}\nmatch:uncased }").
assertValidation(newRestartAction(ClusterSpec.Id.from("test"),
- "Field 'f1' changed: change property 'dictionary: cased/uncased' from 'CASED' to 'UNCASED'"));
+ "Field 'f1' changed: change property 'dictionary: cased/uncased' from 'CASED' to 'UNCASED'"));
}
@Test
- public void changing_dense_posting_list_threshold_require_restart() throws Exception {
+ void changing_dense_posting_list_threshold_require_restart() throws Exception {
new Fixture(
"field f1 type predicate { indexing: attribute \n index { arity: 8 \n dense-posting-list-threshold: 0.2 } }",
"field f1 type predicate { indexing: attribute \n index { arity: 8 \n dense-posting-list-threshold: 0.4 } }").
assertValidation(newRestartAction(ClusterSpec.Id.from("test"),
- "Field 'f1' changed: change property 'dense-posting-list-threshold' from '0.2' to '0.4'"));
+ "Field 'f1' changed: change property 'dense-posting-list-threshold' from '0.2' to '0.4'"));
}
@Test
- public void removing_attribute_aspect_from_index_field_is_ok() throws Exception {
+ void removing_attribute_aspect_from_index_field_is_ok() throws Exception {
Fixture f = new Fixture("field f1 type string { indexing: index | attribute }",
"field f1 type string { indexing: index }");
f.assertValidation();
}
@Test
- public void removing_attribute_aspect_from_index_and_summary_field_is_ok() throws Exception {
+ void removing_attribute_aspect_from_index_and_summary_field_is_ok() throws Exception {
Fixture f = new Fixture("field f1 type string { indexing: index | attribute | summary }",
"field f1 type string { indexing: index | summary }");
f.assertValidation();
}
@Test
- public void adding_rank_filter_requires_restart() throws Exception {
+ void adding_rank_filter_requires_restart() throws Exception {
new Fixture("field f1 type string { indexing: attribute }",
"field f1 type string { indexing: attribute \n rank: filter }").
assertValidation(newRestartAction(ClusterSpec.Id.from("test"),
- "Field 'f1' changed: add attribute 'rank: filter'"));
+ "Field 'f1' changed: add attribute 'rank: filter'"));
}
@Test
- public void removing_rank_filter_requires_restart() throws Exception {
+ void removing_rank_filter_requires_restart() throws Exception {
new Fixture("field f1 type string { indexing: attribute \n rank: filter }",
"field f1 type string { indexing: attribute }").
assertValidation(newRestartAction(ClusterSpec.Id.from("test"),
- "Field 'f1' changed: remove attribute 'rank: filter'"));
+ "Field 'f1' changed: remove attribute 'rank: filter'"));
}
@Test
- public void adding_hnsw_index_requires_restart() throws Exception {
+ void adding_hnsw_index_requires_restart() throws Exception {
new Fixture("field f1 type tensor(x[2]) { indexing: attribute }",
"field f1 type tensor(x[2]) { indexing: attribute | index \n index { hnsw } }").
assertValidation(newRestartAction(ClusterSpec.Id.from("test"),
- "Field 'f1' changed: add attribute 'indexing: index'"));
+ "Field 'f1' changed: add attribute 'indexing: index'"));
}
@Test
- public void removing_hnsw_index_requres_restart() throws Exception {
+ void removing_hnsw_index_requres_restart() throws Exception {
new Fixture("field f1 type tensor(x[2]) { indexing: attribute | index \n index { hnsw } }",
"field f1 type tensor(x[2]) { indexing: attribute }").
assertValidation(newRestartAction(ClusterSpec.Id.from("test"),
- "Field 'f1' changed: remove attribute 'indexing: index'"));
+ "Field 'f1' changed: remove attribute 'indexing: index'"));
}
@Test
- public void changing_distance_metric_without_hnsw_index_enabled_requires_restart() throws Exception {
+ void changing_distance_metric_without_hnsw_index_enabled_requires_restart() throws Exception {
new Fixture("field f1 type tensor(x[2]) { indexing: attribute }",
"field f1 type tensor(x[2]) { indexing: attribute \n attribute { " +
"distance-metric: geodegrees \n } }").
assertValidation(newRestartAction(ClusterSpec.Id.from("test"),
- "Field 'f1' changed: change property " +
- "'distance-metric' from 'EUCLIDEAN' to 'GEODEGREES'"));
+ "Field 'f1' changed: change property " +
+ "'distance-metric' from 'EUCLIDEAN' to 'GEODEGREES'"));
}
@Test
- public void changing_distance_metric_with_hnsw_index_enabled_requires_restart() throws Exception {
+ void changing_distance_metric_with_hnsw_index_enabled_requires_restart() throws Exception {
new Fixture("field f1 type tensor(x[2]) { indexing: attribute | index \n index { hnsw } }",
"field f1 type tensor(x[2]) { indexing: attribute | index \n attribute { " +
"distance-metric: geodegrees \n } }").
assertValidation(newRestartAction(ClusterSpec.Id.from("test"),
- "Field 'f1' changed: change property " +
- "'distance-metric' from 'EUCLIDEAN' to 'GEODEGREES'"));
+ "Field 'f1' changed: change property " +
+ "'distance-metric' from 'EUCLIDEAN' to 'GEODEGREES'"));
}
@Test
- public void changing_hnsw_index_property_max_links_per_node_requires_restart() throws Exception {
+ void changing_hnsw_index_property_max_links_per_node_requires_restart() throws Exception {
new Fixture("field f1 type tensor(x[2]) { indexing: attribute | index \n index { hnsw } }",
"field f1 type tensor(x[2]) { indexing: attribute | index \n index { " +
"hnsw { max-links-per-node: 4 } } }").
assertValidation(newRestartAction(ClusterSpec.Id.from("test"),
- "Field 'f1' changed: change hnsw index property " +
- "'max-links-per-node' from '16' to '4'"));
+ "Field 'f1' changed: change hnsw index property " +
+ "'max-links-per-node' from '16' to '4'"));
}
@Test
- public void changing_hnsw_index_property_neighbors_to_explore_at_insert_requires_restart() throws Exception {
+ void changing_hnsw_index_property_neighbors_to_explore_at_insert_requires_restart() throws Exception {
new Fixture("field f1 type tensor(x[2]) { indexing: attribute | index \n index { hnsw } }",
"field f1 type tensor(x[2]) { indexing: attribute | index \n index { " +
"hnsw { neighbors-to-explore-at-insert: 100 } } }").
assertValidation(newRestartAction(ClusterSpec.Id.from("test"),
- "Field 'f1' changed: change hnsw index property " +
- "'neighbors-to-explore-at-insert' from '200' to '100'"));
+ "Field 'f1' changed: change hnsw index property " +
+ "'neighbors-to-explore-at-insert' from '200' to '100'"));
}
@Test
- public void removing_paged_requires_override() throws Exception {
+ void removing_paged_requires_override() throws Exception {
try {
new Fixture("field f1 type tensor(x[10]) { indexing: attribute \n attribute: paged }",
- "field f1 type tensor(x[10]) { indexing: attribute }").
+ "field f1 type tensor(x[10]) { indexing: attribute }").
assertValidation();
fail("Expected exception on removal of 'paged'");
}