aboutsummaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorHarald Musum <musum@yahooinc.com>2021-10-14 17:03:34 +0200
committerHarald Musum <musum@yahooinc.com>2021-10-14 17:03:34 +0200
commit490ecf937e32e6868d51095ac844533a78a9ab76 (patch)
treebf1f972fd1b0911b3daba92ba07ac5a39cdf169c /config
parent532773cf43f3e4f0919325d25b01e0d640176ecb (diff)
Remove unused classes
Diffstat (limited to 'config')
-rw-r--r--config/src/main/java/com/yahoo/vespa/config/ErrorType.java35
-rw-r--r--config/src/test/java/com/yahoo/config/subscription/impl/JRTConfigRequesterTest.java18
-rw-r--r--config/src/test/java/com/yahoo/vespa/config/ErrorTypeTest.java35
3 files changed, 0 insertions, 88 deletions
diff --git a/config/src/main/java/com/yahoo/vespa/config/ErrorType.java b/config/src/main/java/com/yahoo/vespa/config/ErrorType.java
deleted file mode 100644
index 24af997367e..00000000000
--- a/config/src/main/java/com/yahoo/vespa/config/ErrorType.java
+++ /dev/null
@@ -1,35 +0,0 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-package com.yahoo.vespa.config;
-
-/**
- * @author hmusum
- */
-public enum ErrorType {
- TRANSIENT, FATAL;
-
- public static ErrorType getErrorType(int errorCode) {
- switch (errorCode) {
- case com.yahoo.jrt.ErrorCode.CONNECTION:
- case com.yahoo.jrt.ErrorCode.TIMEOUT:
- return ErrorType.TRANSIENT;
- case ErrorCode.UNKNOWN_CONFIG:
- case ErrorCode.UNKNOWN_DEFINITION:
- case ErrorCode.UNKNOWN_DEF_MD5:
- case ErrorCode.ILLEGAL_NAME:
- case ErrorCode.ILLEGAL_VERSION:
- case ErrorCode.ILLEGAL_CONFIGID:
- case ErrorCode.ILLEGAL_DEF_MD5:
- case ErrorCode.ILLEGAL_CONFIG_MD5:
- case ErrorCode.ILLEGAL_TIMEOUT:
- case ErrorCode.OUTDATED_CONFIG:
- case ErrorCode.INTERNAL_ERROR:
- case ErrorCode.APPLICATION_NOT_LOADED:
- case ErrorCode.UNKNOWN_VESPA_VERSION:
- case ErrorCode.ILLEGAL_PROTOCOL_VERSION:
- case ErrorCode.INCONSISTENT_CONFIG_MD5:
- return ErrorType.FATAL;
- default:
- return ErrorType.FATAL;
- }
- }
-}
diff --git a/config/src/test/java/com/yahoo/config/subscription/impl/JRTConfigRequesterTest.java b/config/src/test/java/com/yahoo/config/subscription/impl/JRTConfigRequesterTest.java
index e60c84df887..62a25fadf25 100644
--- a/config/src/test/java/com/yahoo/config/subscription/impl/JRTConfigRequesterTest.java
+++ b/config/src/test/java/com/yahoo/config/subscription/impl/JRTConfigRequesterTest.java
@@ -8,14 +8,11 @@ import com.yahoo.jrt.Request;
import com.yahoo.vespa.config.ConfigKey;
import com.yahoo.vespa.config.ConnectionPool;
import com.yahoo.vespa.config.ErrorCode;
-import com.yahoo.vespa.config.ErrorType;
import com.yahoo.vespa.config.PayloadChecksums;
import com.yahoo.vespa.config.TimingValues;
import com.yahoo.vespa.config.protocol.JRTServerConfigRequestV3;
import org.junit.Test;
-import java.util.Arrays;
-import java.util.List;
import java.util.Random;
import static com.yahoo.config.subscription.impl.JRTConfigRequester.calculateFailedRequestDelay;
@@ -53,21 +50,6 @@ public class JRTConfigRequesterTest {
}
@Test
- public void testErrorTypes() {
- List<Integer> transientErrors = Arrays.asList(com.yahoo.jrt.ErrorCode.CONNECTION, com.yahoo.jrt.ErrorCode.TIMEOUT);
- List<Integer> fatalErrors = Arrays.asList(ErrorCode.UNKNOWN_CONFIG, ErrorCode.UNKNOWN_DEFINITION, ErrorCode.OUTDATED_CONFIG,
- ErrorCode.UNKNOWN_DEF_MD5, ErrorCode.ILLEGAL_NAME, ErrorCode.ILLEGAL_VERSION, ErrorCode.ILLEGAL_CONFIGID,
- ErrorCode.ILLEGAL_DEF_MD5, ErrorCode.ILLEGAL_CONFIG_MD5, ErrorCode.ILLEGAL_TIMEOUT, ErrorCode.INTERNAL_ERROR,
- 9999); // unknown should also be fatal
- for (Integer i : transientErrors) {
- assertEquals(ErrorType.TRANSIENT, ErrorType.getErrorType(i));
- }
- for (Integer i : fatalErrors) {
- assertEquals(ErrorType.FATAL, ErrorType.getErrorType(i));
- }
- }
-
- @Test
public void testFirstRequestAfterSubscribing() {
ConfigSubscriber subscriber = new ConfigSubscriber();
final TimingValues timingValues = getTestTimingValues();
diff --git a/config/src/test/java/com/yahoo/vespa/config/ErrorTypeTest.java b/config/src/test/java/com/yahoo/vespa/config/ErrorTypeTest.java
deleted file mode 100644
index 66fa5440fe7..00000000000
--- a/config/src/test/java/com/yahoo/vespa/config/ErrorTypeTest.java
+++ /dev/null
@@ -1,35 +0,0 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-package com.yahoo.vespa.config;
-
-import org.junit.Test;
-
-import static org.hamcrest.core.Is.is;
-import static org.junit.Assert.assertThat;
-
-/**
- * @author Ulf Lilleengen
- */
-public class ErrorTypeTest {
-
- @Test
- public void testErrorType() {
- assertThat(ErrorType.getErrorType(com.yahoo.jrt.ErrorCode.CONNECTION), is(ErrorType.TRANSIENT));
- assertThat(ErrorType.getErrorType(com.yahoo.jrt.ErrorCode.TIMEOUT), is(ErrorType.TRANSIENT));
- assertThat(ErrorType.getErrorType(ErrorCode.UNKNOWN_CONFIG), is(ErrorType.FATAL));
- assertThat(ErrorType.getErrorType(ErrorCode.UNKNOWN_DEFINITION), is(ErrorType.FATAL));
- assertThat(ErrorType.getErrorType(ErrorCode.UNKNOWN_DEF_MD5), is(ErrorType.FATAL));
- assertThat(ErrorType.getErrorType(ErrorCode.ILLEGAL_NAME), is(ErrorType.FATAL));
- assertThat(ErrorType.getErrorType(ErrorCode.ILLEGAL_VERSION), is(ErrorType.FATAL));
- assertThat(ErrorType.getErrorType(ErrorCode.ILLEGAL_CONFIGID), is(ErrorType.FATAL));
- assertThat(ErrorType.getErrorType(ErrorCode.ILLEGAL_DEF_MD5), is(ErrorType.FATAL));
- assertThat(ErrorType.getErrorType(ErrorCode.ILLEGAL_CONFIG_MD5), is(ErrorType.FATAL));
- assertThat(ErrorType.getErrorType(ErrorCode.ILLEGAL_TIMEOUT), is(ErrorType.FATAL));
- assertThat(ErrorType.getErrorType(ErrorCode.ILLEGAL_GENERATION), is(ErrorType.FATAL));
- assertThat(ErrorType.getErrorType(ErrorCode.ILLEGAL_SUB_FLAG), is(ErrorType.FATAL));
- assertThat(ErrorType.getErrorType(ErrorCode.OUTDATED_CONFIG), is(ErrorType.FATAL));
- assertThat(ErrorType.getErrorType(ErrorCode.INTERNAL_ERROR), is(ErrorType.FATAL));
- assertThat(ErrorType.getErrorType(ErrorCode.ILLEGAL_SUB_FLAG), is(ErrorType.FATAL));
- assertThat(ErrorType.getErrorType(0xdeadc0de), is(ErrorType.FATAL));
- }
-
-}