Skip to content

Commit

Permalink
Fixes logging message and test.
Browse files Browse the repository at this point in the history
  • Loading branch information
spericas committed May 21, 2024
1 parent 7ad594f commit 57868fd
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,6 @@ protected void startStreamingThreads() {
Thread.sleep(period);
if (sendingQueue.isEmpty()) {
sendingQueue.add(PING_FRAME);
socket().log(LOGGER, DEBUG, "[Heartbeat thread] heartbeat queued");
}
}
} catch (Throwable t) {
Expand All @@ -140,6 +139,7 @@ protected void startStreamingThreads() {
if (bufferData != null) {
if (bufferData == PING_FRAME) { // ping frame
clientStream().sendPing();
socket().log(LOGGER, DEBUG, "[Writing thread] heartbeat sent");
continue;
}
if (bufferData == EMPTY_BUFFER_DATA) { // end marker
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ void testDefaults() {
assertThat(config.pollWaitTime(), is(Duration.ofSeconds(10)));
assertThat(config.abortPollTimeExpired(), is(false));
assertThat(config.initBufferSize(), is(2048));
assertThat(config.heartbeatPeriod(), is(Duration.ofSeconds(0)));
}

@Test
Expand All @@ -46,5 +47,6 @@ void testApplicationConfig() {
assertThat(config.pollWaitTime(), is(Duration.ofSeconds(30)));
assertThat(config.abortPollTimeExpired(), is(true));
assertThat(config.initBufferSize(), is(10000));
assertThat(config.heartbeatPeriod(), is(Duration.ofSeconds(10)));
}
}
3 changes: 2 additions & 1 deletion webclient/tests/grpc/src/test/resources/application.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,5 @@
grpc-client:
poll-wait-time: PT30S
abort-poll-time-expired: true
init-buffer-size: 10000
init-buffer-size: 10000
heartbeat-period: PT10S

0 comments on commit 57868fd

Please sign in to comment.