diff --git a/tycho-its/src/test/java/org/eclipse/tycho/test/target/OfflineModeTest.java b/tycho-its/src/test/java/org/eclipse/tycho/test/target/OfflineModeTest.java index cade4b8e20..7bdf1ea364 100644 --- a/tycho-its/src/test/java/org/eclipse/tycho/test/target/OfflineModeTest.java +++ b/tycho-its/src/test/java/org/eclipse/tycho/test/target/OfflineModeTest.java @@ -92,7 +92,7 @@ private void runAndVerifyOnlineBuild(Verifier verifier) throws VerificationExcep verifier.executeGoal("integration-test"); verifier.verifyErrorFreeLog(); assertFalse(server.getAccessedUrls("test").isEmpty()); - server.getAccessedUrls("test").clear(); + server.clear(); } } diff --git a/tycho-its/src/test/java/org/eclipse/tycho/test/util/HttpServer.java b/tycho-its/src/test/java/org/eclipse/tycho/test/util/HttpServer.java index a67fedffa3..175305c15d 100644 --- a/tycho-its/src/test/java/org/eclipse/tycho/test/util/HttpServer.java +++ b/tycho-its/src/test/java/org/eclipse/tycho/test/util/HttpServer.java @@ -203,6 +203,17 @@ public List getAccessedUrls(String contextName) { } } + /** + * Reset state. + * + * Clear access logs. Does not affect configuration. + **/ + public void clear() { + synchronized (contextName2accessedUrls) { + contextName2accessedUrls.clear(); + } + } + private void registerContext(ServletContextHandler context) { context.addFilter(new FilterHolder(new Monitoring()), "*", EnumSet.of(DispatcherType.REQUEST)); contexts.addHandler(context);