From 8f24051e776b6cbe013cfc7d501fac699d938f88 Mon Sep 17 00:00:00 2001 From: Kiran Kumar Reddy Sathi <67098011+KiranSathi@users.noreply.github.com> Date: Tue, 23 Jun 2020 17:48:07 +0530 Subject: [PATCH 1/2] Avoid sync issue in getBody (#3549) * Avoid sync issue in getBody Avoid ConcurrentModificationException in getBody by using ConcurrentLinkedHashMap instead of lInkedHashMap. * Updated to use synchronizedMap --- .../java/io/micronaut/http/netty/NettyMutableHttpResponse.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/http-netty/src/main/java/io/micronaut/http/netty/NettyMutableHttpResponse.java b/http-netty/src/main/java/io/micronaut/http/netty/NettyMutableHttpResponse.java index f62342ed7ab..d90b6274a19 100644 --- a/http-netty/src/main/java/io/micronaut/http/netty/NettyMutableHttpResponse.java +++ b/http-netty/src/main/java/io/micronaut/http/netty/NettyMutableHttpResponse.java @@ -57,7 +57,7 @@ public class NettyMutableHttpResponse implements MutableHttpResponse { final NettyHttpHeaders headers; private final ConversionService conversionService; private B body; - private final Map convertedBodies = new LinkedHashMap<>(1); + private final Map convertedBodies = Collections.synchronizedMap(new LinkedHashMap<>(1)); private final MutableConvertibleValues attributes; private ServerCookieEncoder serverCookieEncoder = DEFAULT_SERVER_COOKIE_ENCODER; From 5ae77a139dc97f68fe4851faf53f002c43d1e13b Mon Sep 17 00:00:00 2001 From: graemerocher Date: Wed, 24 Jun 2020 13:19:09 +0200 Subject: [PATCH 2/2] Publish test reports --- .github/workflows/gradle.yml | 6 ++++++ build.gradle | 4 +++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index 4ba232d6283..1e89dbaf54b 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -32,6 +32,12 @@ jobs: java-version: ${{ matrix.java }} - name: Build with Gradle run: ./gradlew check --no-daemon --parallel --continue + - name: Publish Test Report + if: failure() + uses: scacap/action-surefire-report@v1 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + report_paths: '**/build/test-results/test/TEST-*.xml' - name: Publish to JFrog OSS if: success() && github.event_name == 'push' && matrix.java == '8' && github.ref == 'refs/heads/1.3.x' env: diff --git a/build.gradle b/build.gradle index 48a82854857..e95e8e611fc 100644 --- a/build.gradle +++ b/build.gradle @@ -692,7 +692,9 @@ subprojects { Project subproject -> System.out.print(".") System.out.flush() } - + reports { + junitXml.enabled = true + } systemProperty "micronaut.cloud.platform", "OTHER" }