From 82bc317a64690e0ccc2ffeecdf953d41b8ca74a8 Mon Sep 17 00:00:00 2001 From: "izaaz.yunus" Date: Tue, 27 Feb 2024 11:06:05 -0800 Subject: [PATCH 1/6] chore: Fix failing test in github actions --- .github/workflows/pull-request-test.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/pull-request-test.yml b/.github/workflows/pull-request-test.yml index 4b7386a..a8801be 100644 --- a/.github/workflows/pull-request-test.yml +++ b/.github/workflows/pull-request-test.yml @@ -12,6 +12,10 @@ jobs: java-version: '8' distribution: 'zulu' - uses: actions/checkout@v3 + + - name: Build + run: ./gradlew build + - name: Test with Gradle run: ./gradlew test:test --stacktrace From f50729ac3a4cf0876626e327d784eeae1bc193a5 Mon Sep 17 00:00:00 2001 From: "izaaz.yunus" Date: Tue, 27 Feb 2024 11:10:43 -0800 Subject: [PATCH 2/6] chore: Fix failing test in github actions --- src/test/java/com/amplitude/HttpTransportTest.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/test/java/com/amplitude/HttpTransportTest.java b/src/test/java/com/amplitude/HttpTransportTest.java index 2b40400..c10310e 100644 --- a/src/test/java/com/amplitude/HttpTransportTest.java +++ b/src/test/java/com/amplitude/HttpTransportTest.java @@ -476,7 +476,9 @@ public void onLogEventServerResponse(Event event, int status, String message) { } httpTransport.shutdown(); - assertTrue(latch.await(5L, TimeUnit.SECONDS)); + boolean success = latch.await(5L, TimeUnit.SECONDS); + assertEquals(0, latch.getCount()); + assertTrue(success); for (Event event : events) { assertEquals(200, resultMap.get(event)); } From 800e7f118bb498aaac87cafb6abecc5be28c322f Mon Sep 17 00:00:00 2001 From: "izaaz.yunus" Date: Tue, 27 Feb 2024 11:13:51 -0800 Subject: [PATCH 3/6] chore: Fix failing test in github actions --- src/test/java/com/amplitude/HttpTransportTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/java/com/amplitude/HttpTransportTest.java b/src/test/java/com/amplitude/HttpTransportTest.java index c10310e..b95e994 100644 --- a/src/test/java/com/amplitude/HttpTransportTest.java +++ b/src/test/java/com/amplitude/HttpTransportTest.java @@ -476,7 +476,7 @@ public void onLogEventServerResponse(Event event, int status, String message) { } httpTransport.shutdown(); - boolean success = latch.await(5L, TimeUnit.SECONDS); + boolean success = latch.await(10L, TimeUnit.SECONDS); assertEquals(0, latch.getCount()); assertTrue(success); for (Event event : events) { From a10b2c22b29fbeacc74487e48a07fb5fb0a353b1 Mon Sep 17 00:00:00 2001 From: "izaaz.yunus" Date: Tue, 27 Feb 2024 11:15:47 -0800 Subject: [PATCH 4/6] chore: Fix failing test in github actions --- .github/workflows/pull-request-test.yml | 3 --- src/test/java/com/amplitude/HttpTransportTest.java | 4 +--- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/.github/workflows/pull-request-test.yml b/.github/workflows/pull-request-test.yml index a8801be..0ba33e6 100644 --- a/.github/workflows/pull-request-test.yml +++ b/.github/workflows/pull-request-test.yml @@ -13,9 +13,6 @@ jobs: distribution: 'zulu' - uses: actions/checkout@v3 - - name: Build - run: ./gradlew build - - name: Test with Gradle run: ./gradlew test:test --stacktrace diff --git a/src/test/java/com/amplitude/HttpTransportTest.java b/src/test/java/com/amplitude/HttpTransportTest.java index b95e994..2b40400 100644 --- a/src/test/java/com/amplitude/HttpTransportTest.java +++ b/src/test/java/com/amplitude/HttpTransportTest.java @@ -476,9 +476,7 @@ public void onLogEventServerResponse(Event event, int status, String message) { } httpTransport.shutdown(); - boolean success = latch.await(10L, TimeUnit.SECONDS); - assertEquals(0, latch.getCount()); - assertTrue(success); + assertTrue(latch.await(5L, TimeUnit.SECONDS)); for (Event event : events) { assertEquals(200, resultMap.get(event)); } From 369dc099f9879d4ab0fac87613c2371e5fa804c1 Mon Sep 17 00:00:00 2001 From: "izaaz.yunus" Date: Tue, 27 Feb 2024 11:16:55 -0800 Subject: [PATCH 5/6] chore: Fix failing test in github actions --- src/test/java/com/amplitude/HttpTransportTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/java/com/amplitude/HttpTransportTest.java b/src/test/java/com/amplitude/HttpTransportTest.java index 2b40400..feb7451 100644 --- a/src/test/java/com/amplitude/HttpTransportTest.java +++ b/src/test/java/com/amplitude/HttpTransportTest.java @@ -476,7 +476,7 @@ public void onLogEventServerResponse(Event event, int status, String message) { } httpTransport.shutdown(); - assertTrue(latch.await(5L, TimeUnit.SECONDS)); + assertTrue(latch.await(10L, TimeUnit.SECONDS)); for (Event event : events) { assertEquals(200, resultMap.get(event)); } From eba6a30f53eed56bc683c2eeda4b4208e0d3ac32 Mon Sep 17 00:00:00 2001 From: "izaaz.yunus" Date: Tue, 27 Feb 2024 11:18:31 -0800 Subject: [PATCH 6/6] chore: Fix failing test in github actions --- .github/workflows/pull-request-test.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/pull-request-test.yml b/.github/workflows/pull-request-test.yml index 0ba33e6..4b7386a 100644 --- a/.github/workflows/pull-request-test.yml +++ b/.github/workflows/pull-request-test.yml @@ -12,7 +12,6 @@ jobs: java-version: '8' distribution: 'zulu' - uses: actions/checkout@v3 - - name: Test with Gradle run: ./gradlew test:test --stacktrace