aboutsummaryrefslogtreecommitdiffstats
path: root/jdisc_core/src/main/java/com/yahoo/jdisc/test
diff options
context:
space:
mode:
Diffstat (limited to 'jdisc_core/src/main/java/com/yahoo/jdisc/test')
-rw-r--r--jdisc_core/src/main/java/com/yahoo/jdisc/test/MockMetric.java2
-rw-r--r--jdisc_core/src/main/java/com/yahoo/jdisc/test/NonWorkingClientProvider.java2
-rw-r--r--jdisc_core/src/main/java/com/yahoo/jdisc/test/NonWorkingCompletionHandler.java2
-rw-r--r--jdisc_core/src/main/java/com/yahoo/jdisc/test/NonWorkingContentChannel.java2
-rw-r--r--jdisc_core/src/main/java/com/yahoo/jdisc/test/NonWorkingOsgiFramework.java2
-rw-r--r--jdisc_core/src/main/java/com/yahoo/jdisc/test/NonWorkingRequest.java2
-rw-r--r--jdisc_core/src/main/java/com/yahoo/jdisc/test/NonWorkingRequestHandler.java2
-rw-r--r--jdisc_core/src/main/java/com/yahoo/jdisc/test/NonWorkingResponseHandler.java2
-rw-r--r--jdisc_core/src/main/java/com/yahoo/jdisc/test/NonWorkingServerProvider.java2
-rw-r--r--jdisc_core/src/main/java/com/yahoo/jdisc/test/ServerProviderConformanceTest.java8
-rw-r--r--jdisc_core/src/main/java/com/yahoo/jdisc/test/TestDriver.java2
-rw-r--r--jdisc_core/src/main/java/com/yahoo/jdisc/test/TestTimer.java2
-rw-r--r--jdisc_core/src/main/java/com/yahoo/jdisc/test/package-info.java2
13 files changed, 19 insertions, 13 deletions
diff --git a/jdisc_core/src/main/java/com/yahoo/jdisc/test/MockMetric.java b/jdisc_core/src/main/java/com/yahoo/jdisc/test/MockMetric.java
index bca6e7082c9..2ccf7de245a 100644
--- a/jdisc_core/src/main/java/com/yahoo/jdisc/test/MockMetric.java
+++ b/jdisc_core/src/main/java/com/yahoo/jdisc/test/MockMetric.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.jdisc.test;
import com.yahoo.jdisc.Metric;
diff --git a/jdisc_core/src/main/java/com/yahoo/jdisc/test/NonWorkingClientProvider.java b/jdisc_core/src/main/java/com/yahoo/jdisc/test/NonWorkingClientProvider.java
index 139e24c1eca..57bbd3f2091 100644
--- a/jdisc_core/src/main/java/com/yahoo/jdisc/test/NonWorkingClientProvider.java
+++ b/jdisc_core/src/main/java/com/yahoo/jdisc/test/NonWorkingClientProvider.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.jdisc.test;
import com.yahoo.jdisc.NoopSharedResource;
diff --git a/jdisc_core/src/main/java/com/yahoo/jdisc/test/NonWorkingCompletionHandler.java b/jdisc_core/src/main/java/com/yahoo/jdisc/test/NonWorkingCompletionHandler.java
index 3639e7f9216..f8074dbcf81 100644
--- a/jdisc_core/src/main/java/com/yahoo/jdisc/test/NonWorkingCompletionHandler.java
+++ b/jdisc_core/src/main/java/com/yahoo/jdisc/test/NonWorkingCompletionHandler.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.jdisc.test;
import com.yahoo.jdisc.handler.CompletionHandler;
diff --git a/jdisc_core/src/main/java/com/yahoo/jdisc/test/NonWorkingContentChannel.java b/jdisc_core/src/main/java/com/yahoo/jdisc/test/NonWorkingContentChannel.java
index 58c1711cc43..36986dd452f 100644
--- a/jdisc_core/src/main/java/com/yahoo/jdisc/test/NonWorkingContentChannel.java
+++ b/jdisc_core/src/main/java/com/yahoo/jdisc/test/NonWorkingContentChannel.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.jdisc.test;
import com.yahoo.jdisc.handler.CompletionHandler;
diff --git a/jdisc_core/src/main/java/com/yahoo/jdisc/test/NonWorkingOsgiFramework.java b/jdisc_core/src/main/java/com/yahoo/jdisc/test/NonWorkingOsgiFramework.java
index 01e00fe8ba3..1b90e8adcfe 100644
--- a/jdisc_core/src/main/java/com/yahoo/jdisc/test/NonWorkingOsgiFramework.java
+++ b/jdisc_core/src/main/java/com/yahoo/jdisc/test/NonWorkingOsgiFramework.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.jdisc.test;
import com.yahoo.jdisc.application.OsgiFramework;
diff --git a/jdisc_core/src/main/java/com/yahoo/jdisc/test/NonWorkingRequest.java b/jdisc_core/src/main/java/com/yahoo/jdisc/test/NonWorkingRequest.java
index 6897fb75848..d962c0d9fc0 100644
--- a/jdisc_core/src/main/java/com/yahoo/jdisc/test/NonWorkingRequest.java
+++ b/jdisc_core/src/main/java/com/yahoo/jdisc/test/NonWorkingRequest.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.jdisc.test;
import com.google.inject.Module;
diff --git a/jdisc_core/src/main/java/com/yahoo/jdisc/test/NonWorkingRequestHandler.java b/jdisc_core/src/main/java/com/yahoo/jdisc/test/NonWorkingRequestHandler.java
index 4ed2cd83244..bec15d99ff1 100644
--- a/jdisc_core/src/main/java/com/yahoo/jdisc/test/NonWorkingRequestHandler.java
+++ b/jdisc_core/src/main/java/com/yahoo/jdisc/test/NonWorkingRequestHandler.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.jdisc.test;
import com.yahoo.jdisc.NoopSharedResource;
diff --git a/jdisc_core/src/main/java/com/yahoo/jdisc/test/NonWorkingResponseHandler.java b/jdisc_core/src/main/java/com/yahoo/jdisc/test/NonWorkingResponseHandler.java
index 40f18cd9859..2101a4a2245 100644
--- a/jdisc_core/src/main/java/com/yahoo/jdisc/test/NonWorkingResponseHandler.java
+++ b/jdisc_core/src/main/java/com/yahoo/jdisc/test/NonWorkingResponseHandler.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.jdisc.test;
import com.yahoo.jdisc.Response;
diff --git a/jdisc_core/src/main/java/com/yahoo/jdisc/test/NonWorkingServerProvider.java b/jdisc_core/src/main/java/com/yahoo/jdisc/test/NonWorkingServerProvider.java
index 7dc578e4ae6..8a974d2eafa 100644
--- a/jdisc_core/src/main/java/com/yahoo/jdisc/test/NonWorkingServerProvider.java
+++ b/jdisc_core/src/main/java/com/yahoo/jdisc/test/NonWorkingServerProvider.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.jdisc.test;
import com.yahoo.jdisc.NoopSharedResource;
diff --git a/jdisc_core/src/main/java/com/yahoo/jdisc/test/ServerProviderConformanceTest.java b/jdisc_core/src/main/java/com/yahoo/jdisc/test/ServerProviderConformanceTest.java
index 1cf4e3dd858..7b051695593 100644
--- a/jdisc_core/src/main/java/com/yahoo/jdisc/test/ServerProviderConformanceTest.java
+++ b/jdisc_core/src/main/java/com/yahoo/jdisc/test/ServerProviderConformanceTest.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.jdisc.test;
import com.yahoo.api.annotations.Beta;
@@ -11,6 +11,7 @@ import com.yahoo.jdisc.Request;
import com.yahoo.jdisc.Response;
import com.yahoo.jdisc.application.BindingSetSelector;
import com.yahoo.jdisc.application.ContainerBuilder;
+import com.yahoo.jdisc.application.GuiceRepository;
import com.yahoo.jdisc.handler.AbstractRequestHandler;
import com.yahoo.jdisc.handler.CompletionHandler;
import com.yahoo.jdisc.handler.ContentChannel;
@@ -75,6 +76,9 @@ public abstract class ServerProviderConformanceTest {
Iterable<ByteBuffer> newResponseContent();
void validateResponse(V response) throws Throwable;
+
+ default AutoCloseable configureServerProvider(GuiceRepository guice) { return () -> { }; }
+
}
/**
@@ -2784,6 +2788,7 @@ public abstract class ServerProviderConformanceTest {
builder.serverBindings().bind(builder.getInstance(Key.get(String.class, Names.named("serverBinding"))),
requestHandler);
final T serverProvider = builder.guiceModules().getInstance(adapter.getServerProviderClass());
+ AutoCloseable scaffolding = adapter.configureServerProvider(builder.guiceModules());
builder.serverProviders().install(serverProvider);
if (builder.getInstance(Key.get(Boolean.class, Names.named("activateContainer")))) {
driver.activateContainer(builder);
@@ -2804,6 +2809,7 @@ public abstract class ServerProviderConformanceTest {
requestHandler.awaitAsyncTasks();
}
+ scaffolding.close();
serverProvider.close();
driver.close();
}
diff --git a/jdisc_core/src/main/java/com/yahoo/jdisc/test/TestDriver.java b/jdisc_core/src/main/java/com/yahoo/jdisc/test/TestDriver.java
index fe968f2290a..e3bc8aa3b42 100644
--- a/jdisc_core/src/main/java/com/yahoo/jdisc/test/TestDriver.java
+++ b/jdisc_core/src/main/java/com/yahoo/jdisc/test/TestDriver.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.jdisc.test;
import com.google.inject.AbstractModule;
diff --git a/jdisc_core/src/main/java/com/yahoo/jdisc/test/TestTimer.java b/jdisc_core/src/main/java/com/yahoo/jdisc/test/TestTimer.java
index cd21ab84538..3f1218bf688 100644
--- a/jdisc_core/src/main/java/com/yahoo/jdisc/test/TestTimer.java
+++ b/jdisc_core/src/main/java/com/yahoo/jdisc/test/TestTimer.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.jdisc.test;
import com.yahoo.jdisc.Timer;
diff --git a/jdisc_core/src/main/java/com/yahoo/jdisc/test/package-info.java b/jdisc_core/src/main/java/com/yahoo/jdisc/test/package-info.java
index bfb4088aa99..d32815505d7 100644
--- a/jdisc_core/src/main/java/com/yahoo/jdisc/test/package-info.java
+++ b/jdisc_core/src/main/java/com/yahoo/jdisc/test/package-info.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
/**
* <p>Provides classes and interfaces for implementing unit tests of jDISC components.</p>
*