aboutsummaryrefslogtreecommitdiffstats
path: root/config-model/src/test/java
diff options
context:
space:
mode:
authorLester Solbakken <lester.solbakken@gmail.com>2024-05-03 12:22:52 +0200
committerLester Solbakken <lester.solbakken@gmail.com>2024-05-03 12:22:52 +0200
commit1f22a18d27c99abbf81ce208d5584f58ea5b34ac (patch)
treeff0c211861b41f1bfd45c0f57a7da1cb32217dbe /config-model/src/test/java
parentf3a6f2dedc0f6c43b7a51d348b9096a676b168c5 (diff)
Only restart if local LLM is found in both previous and next generation
Diffstat (limited to 'config-model/src/test/java')
-rw-r--r--config-model/src/test/java/com/yahoo/vespa/model/application/validation/change/RestartOnDeployForLocalLLMValidatorTest.java13
1 files changed, 8 insertions, 5 deletions
diff --git a/config-model/src/test/java/com/yahoo/vespa/model/application/validation/change/RestartOnDeployForLocalLLMValidatorTest.java b/config-model/src/test/java/com/yahoo/vespa/model/application/validation/change/RestartOnDeployForLocalLLMValidatorTest.java
index 30915ad02fc..311d4f39fcd 100644
--- a/config-model/src/test/java/com/yahoo/vespa/model/application/validation/change/RestartOnDeployForLocalLLMValidatorTest.java
+++ b/config-model/src/test/java/com/yahoo/vespa/model/application/validation/change/RestartOnDeployForLocalLLMValidatorTest.java
@@ -19,22 +19,25 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
*/
public class RestartOnDeployForLocalLLMValidatorTest {
+ public static final String OPENAI_LLM_COMPONENT = "ai.vespa.llm.clients.OpenAI";
+ public static final String LOCAL_LLM_COMPONENT = "ai.vespa.llm.clients.LocalLLM";
+
@Test
void validate_no_restart_on_deploy() {
- VespaModel current = createModelWithComponent("ai.vespa.llm.clients.OpenAI");
- VespaModel next = createModelWithComponent("ai.vespa.llm.clients.OpenAI");
+ VespaModel current = createModelWithComponent(OPENAI_LLM_COMPONENT);
+ VespaModel next = createModelWithComponent(LOCAL_LLM_COMPONENT);
List<ConfigChangeAction> result = validateModel(current, next);
assertEquals(0, result.size());
}
@Test
void validate_restart_on_deploy() {
- VespaModel current = createModelWithComponent("ai.vespa.llm.clients.LocalLLM");
- VespaModel next = createModelWithComponent("ai.vespa.llm.clients.LocalLLM");
+ VespaModel current = createModelWithComponent(LOCAL_LLM_COMPONENT);
+ VespaModel next = createModelWithComponent(LOCAL_LLM_COMPONENT);
List<ConfigChangeAction> result = validateModel(current, next);
assertEquals(1, result.size());
assertTrue(result.get(0).validationId().isEmpty());
- assertEquals("Restarting services in container cluster 'cluster1' because of local LLM use", result.get(0).getMessage());
+ assertEquals("Need to restart services in cluster 'cluster1' due to use of local LLM", result.get(0).getMessage());
}
private static List<ConfigChangeAction> validateModel(VespaModel current, VespaModel next) {