From ed9a7ce0d1e4f163cfde22ac51a37bbcab6f2171 Mon Sep 17 00:00:00 2001 From: "igor.calabria" Date: Mon, 16 Sep 2019 18:07:01 -0300 Subject: [PATCH 1/3] fix (#1767): remove fixed override for ping interval in okHttpClient since this value is configurable we should not override it with a fixed value --- .../kubernetes/client/dsl/internal/WatchConnectionManager.java | 1 - 1 file changed, 1 deletion(-) diff --git a/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/internal/WatchConnectionManager.java b/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/internal/WatchConnectionManager.java index d8701fd1c22..9043e19a4ff 100644 --- a/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/internal/WatchConnectionManager.java +++ b/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/internal/WatchConnectionManager.java @@ -82,7 +82,6 @@ public WatchConnectionManager(final OkHttpClient client, final BaseOperation Date: Mon, 16 Sep 2019 19:03:37 -0300 Subject: [PATCH 2/3] fix (#1767): set default ping interval to 30 seconds --- .../src/main/java/io/fabric8/kubernetes/client/Config.java | 2 +- .../test/java/io/fabric8/kubernetes/client/ConfigTest.java | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/Config.java b/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/Config.java index 2547c2fa4dc..ecf116f1de9 100644 --- a/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/Config.java +++ b/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/Config.java @@ -126,7 +126,7 @@ public class Config { public static final Long DEFAULT_SCALE_TIMEOUT = 10 * 60 * 1000L; public static final int DEFAULT_LOGGING_INTERVAL = 20 * 1000; public static final Long DEFAULT_WEBSOCKET_TIMEOUT = 5 * 1000L; - public static final Long DEFAULT_WEBSOCKET_PING_INTERVAL = 1 * 1000L; + public static final Long DEFAULT_WEBSOCKET_PING_INTERVAL = 30 * 1000L; public static final Integer DEFAULT_MAX_CONCURRENT_REQUESTS = 64; public static final Integer DEFAULT_MAX_CONCURRENT_REQUESTS_PER_HOST = 5; diff --git a/kubernetes-client/src/test/java/io/fabric8/kubernetes/client/ConfigTest.java b/kubernetes-client/src/test/java/io/fabric8/kubernetes/client/ConfigTest.java index 47968e42eab..12826cb6521 100644 --- a/kubernetes-client/src/test/java/io/fabric8/kubernetes/client/ConfigTest.java +++ b/kubernetes-client/src/test/java/io/fabric8/kubernetes/client/ConfigTest.java @@ -460,6 +460,13 @@ public void shouldBeUsedTokenSuppliedByProvider() throws Exception { assertEquals("PROVIDER_TOKEN", config.getOauthToken()); } + @Test + public void shouldHonorDefaultWebsocketPingInterval() { + Config config = new ConfigBuilder().build(); + + assertEquals(30000L, config.getWebsocketPingInterval()); + } + private void assertConfig(Config config) { assertNotNull(config); assertTrue(config.isTrustCerts()); From 23afe5bbd262c6615b66e8b64b77185a80519c7d Mon Sep 17 00:00:00 2001 From: "igor.calabria" Date: Mon, 16 Sep 2019 18:20:08 -0300 Subject: [PATCH 3/3] chore: update change log with fixes --- CHANGELOG.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 67cb937a5ab..c25a05507e0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,16 @@ ### 4.5-SNAPSHOT #### Bugs +* Fix #1767: Removed fixed override for Okhttp client's `pingInterval` + +#### Improvements + +#### Dependency Upgrade + +#### New Feature + +### 4.5.2 (14-09-2019) +#### Bugs * Fix #1759: Portforwarding is broken #### Improvements