You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by ch...@apache.org on 2023/04/25 08:48:34 UTC
[flink] branch release-1.17 updated: [FLINK-31897][tests] Fix the unstable test ClientTest#testRequestUnavailableHost
This is an automated email from the ASF dual-hosted git repository.
chesnay pushed a commit to branch release-1.17
in repository https://gitbox.apache.org/repos/asf/flink.git
The following commit(s) were added to refs/heads/release-1.17 by this push:
new a0c734ffdec [FLINK-31897][tests] Fix the unstable test ClientTest#testRequestUnavailableHost
a0c734ffdec is described below
commit a0c734ffdecdb9fcbc31538c74f8da5762da8207
Author: Yuxin Tan <ta...@gmail.com>
AuthorDate: Mon Apr 24 22:59:24 2023 +0800
[FLINK-31897][tests] Fix the unstable test ClientTest#testRequestUnavailableHost
---
.../java/org/apache/flink/queryablestate/network/ClientTest.java | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/flink-queryable-state/flink-queryable-state-runtime/src/test/java/org/apache/flink/queryablestate/network/ClientTest.java b/flink-queryable-state/flink-queryable-state-runtime/src/test/java/org/apache/flink/queryablestate/network/ClientTest.java
index 193508ce16f..43501aafd00 100644
--- a/flink-queryable-state/flink-queryable-state-runtime/src/test/java/org/apache/flink/queryablestate/network/ClientTest.java
+++ b/flink-queryable-state/flink-queryable-state-runtime/src/test/java/org/apache/flink/queryablestate/network/ClientTest.java
@@ -244,7 +244,7 @@ public class ClientTest extends TestLogger {
/** Tests that a request to an unavailable host is failed with ConnectException. */
@Test
- public void testRequestUnavailableHost() throws Exception {
+ public void testRequestUnavailableHost() {
AtomicKvStateRequestStats stats = new AtomicKvStateRequestStats();
MessageSerializer<KvStateInternalRequest, KvStateResponse> serializer =
@@ -257,7 +257,10 @@ public class ClientTest extends TestLogger {
try {
client = new Client<>("Test Client", 1, serializer, stats);
- InetSocketAddress serverAddress = new InetSocketAddress(InetAddress.getLocalHost(), 0);
+ // Since no real servers are created based on the server address, the given fixed port
+ // is enough.
+ InetSocketAddress serverAddress =
+ new InetSocketAddress("flink-qs-client-test-unavailable-host", 12345);
KvStateInternalRequest request =
new KvStateInternalRequest(new KvStateID(), new byte[0]);