Skip to content

Commit

Permalink
fix: Fixes org.mock-server to be 5.11.2 to utilize newer netty (#7458)
Browse files Browse the repository at this point in the history
  • Loading branch information
AlanConfluent authored Apr 30, 2021
1 parent f2ad848 commit 0df7dfc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
4 changes: 2 additions & 2 deletions ksqldb-version-metrics-client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
<dependency>
<groupId>org.mock-server</groupId>
<artifactId>mockserver-netty</artifactId>
<version>3.10.4</version>
<version>5.11.2</version>
<scope>test</scope>
<exclusions>
<exclusion>
Expand All @@ -77,7 +77,7 @@
<dependency>
<groupId>org.mock-server</groupId>
<artifactId>mockserver-client-java</artifactId>
<version>3.10.4</version>
<version>5.11.2</version>
<scope>test</scope>
<exclusions>
<exclusion>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

import static io.confluent.ksql.test.util.AssertEventually.assertThatEventually;
import static org.hamcrest.Matchers.is;
import static org.mockserver.integration.ClientAndServer.startClientAndServer;
import static org.mockserver.model.HttpRequest.request;

import io.confluent.ksql.version.metrics.collector.KsqlModuleType;
Expand All @@ -27,13 +28,13 @@
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.Timeout;
import org.mockserver.integration.ClientAndProxy;
import org.mockserver.integration.ClientAndServer;
import org.mockserver.socket.PortFactory;

public class VersionCheckerIntegrationTest {

private static int proxyPort;
private static ClientAndProxy clientAndProxy;
private static ClientAndServer mockServer;

@Rule
public final Timeout timeout = Timeout.builder()
Expand All @@ -44,7 +45,7 @@ public class VersionCheckerIntegrationTest {
@BeforeClass
public static void startProxy() {
proxyPort = PortFactory.findFreePort();
clientAndProxy = ClientAndProxy.startClientAndProxy(proxyPort);
mockServer = startClientAndServer(proxyPort);
}

@Test
Expand All @@ -64,7 +65,7 @@ public void testMetricsAgent() throws InterruptedException {

assertThatEventually("Version not submitted", () -> {
try {
clientAndProxy.verify(request().withPath("/ksql/anon").withMethod("POST"));
mockServer.verify(request().withPath("/ksql/anon").withMethod("POST"));
return true;
} catch (final AssertionError e) {
return false;
Expand Down

0 comments on commit 0df7dfc

Please sign in to comment.