Skip to content

Commit 3bd02c7

Browse files
committed
Pin codecov action and allow more time in pong timeout test
Pin codecov/codecov-action to the v5.5.5 commit. The pong timeout test waited exactly as long as the close takes to be scheduled, so it failed intermittently on CI.
1 parent 85b4798 commit 3bd02c7

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

‎.github/workflows/ci.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
run: ./gradlew jacocoTestReport test
2828
- name: Code coverage
2929
if: ${{ matrix.java-version == 17 }}
30-
uses: codecov/codecov-action@v5
30+
uses: codecov/codecov-action@0fb7174895f61a3b6b78fc075e0cd60383518dac # v5.5.5
3131
with:
3232
token: ${{ secrets.CODECOV_TOKEN }}
3333
fail_ci_if_error: false

‎src/test/java/com/pusher/client/connection/websocket/WebSocketConnectionTest.java‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,8 @@ public void testPongTimeoutResultsInClosingConnection() {
367367
connection.connect();
368368
connection.onMessage(CONN_ESTABLISHED_EVENT);
369369

370-
verify(mockUnderlyingConnection, timeout((int) (ACTIVITY_TIMEOUT + PONG_TIMEOUT))).close();
370+
// The close is scheduled at ACTIVITY_TIMEOUT + PONG_TIMEOUT, so allow extra time for slow CI runners
371+
verify(mockUnderlyingConnection, timeout((int) (ACTIVITY_TIMEOUT + PONG_TIMEOUT) * 2)).close();
371372
}
372373

373374
@Test

0 commit comments

Comments
 (0)