From 37bf49149bab96c9b02a5238aadc51abcd0dd17a Mon Sep 17 00:00:00 2001 From: Sergei Vorona Date: Thu, 3 Aug 2023 15:11:02 +1000 Subject: [PATCH 1/5] update sonar.yml --- .github/workflows/sonar.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/sonar.yml b/.github/workflows/sonar.yml index 7987a06..6d97ac1 100644 --- a/.github/workflows/sonar.yml +++ b/.github/workflows/sonar.yml @@ -19,10 +19,10 @@ jobs: uses: actions/setup-java@v3 with: distribution: 'zulu' - java-version: 11 + java-version: 17 - name: Analyze with SonarCloud env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} # run sonar maven plugin: - run: mvn -B verify sonar:sonar -Dsonar.projectKey=antkorwin_xsync -Dsonar.organization=antkorwin-github -Dsonar.host.url=https://sonarcloud.io -Dsonar.login=$SONAR_TOKEN -Dsonar.coverage.jacoco.xmlReportPaths=./target/site/jacoco/jacoco.xml + run: mvn -B verify sonar:sonar -Dsonar.projectKey=antkorwin_xsync -Dsonar.organization=antkorwin-github -Dsonar.host.url=https://sonarcloud.io -Dsonar.token=$SONAR_TOKEN -Dsonar.coverage.jacoco.xmlReportPaths=./target/site/jacoco/jacoco.xml From af9f71756a6eee84895119e92cd05a38b2434711 Mon Sep 17 00:00:00 2001 From: Sergei Vorona Date: Thu, 3 Aug 2023 15:18:41 +1000 Subject: [PATCH 2/5] update sonar.yml --- .github/workflows/sonar.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/sonar.yml b/.github/workflows/sonar.yml index 6d97ac1..6a64cf6 100644 --- a/.github/workflows/sonar.yml +++ b/.github/workflows/sonar.yml @@ -19,7 +19,7 @@ jobs: uses: actions/setup-java@v3 with: distribution: 'zulu' - java-version: 17 + java-version: 11 - name: Analyze with SonarCloud env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From d8c5b3edba40c87fc60c71faca6853f1735f2776 Mon Sep 17 00:00:00 2001 From: Sergei Vorona Date: Thu, 3 Aug 2023 15:27:12 +1000 Subject: [PATCH 3/5] support java 11 --- pom.xml | 40 +++++++++++++------ .../xsync/CollisionDetectorTest.java | 6 ++- .../antkorwin/xsync/MultiKeysXSyncTest.java | 4 +- 3 files changed, 34 insertions(+), 16 deletions(-) diff --git a/pom.xml b/pom.xml index f6dbba9..d25e896 100755 --- a/pom.xml +++ b/pom.xml @@ -65,17 +65,22 @@ - - - - org.junit - junit-bom - ${junit-jupiter.version} - pom - import - - - + + + + org.junit + junit-bom + ${junit-jupiter.version} + pom + import + + + org.projectlombok + lombok + 1.18.28 + + + org.awaitility @@ -92,7 +97,13 @@ org.mockito mockito-core - 2.15.0 + 3.5.13 + test + + + org.mockito + mockito-junit-jupiter + 4.11.0 test @@ -209,7 +220,7 @@ org.jacoco jacoco-maven-plugin - 0.8.4 + 0.8.6 @@ -257,6 +268,9 @@ org.apache.maven.plugins maven-javadoc-plugin 2.9.1 + + 8 + attach-javadocs diff --git a/src/test/java/com/antkorwin/xsync/CollisionDetectorTest.java b/src/test/java/com/antkorwin/xsync/CollisionDetectorTest.java index 61b7625..deb0518 100644 --- a/src/test/java/com/antkorwin/xsync/CollisionDetectorTest.java +++ b/src/test/java/com/antkorwin/xsync/CollisionDetectorTest.java @@ -6,13 +6,17 @@ import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Nested; import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.mockito.Mock; +import org.mockito.junit.jupiter.MockitoExtension; import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.mock; - +@ExtendWith(MockitoExtension.class) class CollisionDetectorTest { + @Mock private XMutexFactory factory; private MutexSorter sorter; diff --git a/src/test/java/com/antkorwin/xsync/MultiKeysXSyncTest.java b/src/test/java/com/antkorwin/xsync/MultiKeysXSyncTest.java index a70e77c..081a202 100644 --- a/src/test/java/com/antkorwin/xsync/MultiKeysXSyncTest.java +++ b/src/test/java/com/antkorwin/xsync/MultiKeysXSyncTest.java @@ -326,14 +326,14 @@ void throwExceptionInFunction() { try { xsync.evaluate(Arrays.asList(123L), () -> { // nop - throw new NotImplementedException(); + throw new UnsupportedOperationException(); }); } catch (Exception e) { exception = e; } assertThat(exception).isNotNull(); - assertThat(exception.getClass()).isEqualTo(NotImplementedException.class); + assertThat(exception.getClass()).isEqualTo(UnsupportedOperationException.class); } From ff16f6d0fe7e2c75dbe487e8f802ea460738a140 Mon Sep 17 00:00:00 2001 From: Sergei Vorona Date: Thu, 3 Aug 2023 15:33:02 +1000 Subject: [PATCH 4/5] update sonar.yml --- .github/workflows/sonar.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/sonar.yml b/.github/workflows/sonar.yml index 6a64cf6..9680759 100644 --- a/.github/workflows/sonar.yml +++ b/.github/workflows/sonar.yml @@ -25,4 +25,4 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} # run sonar maven plugin: - run: mvn -B verify sonar:sonar -Dsonar.projectKey=antkorwin_xsync -Dsonar.organization=antkorwin-github -Dsonar.host.url=https://sonarcloud.io -Dsonar.token=$SONAR_TOKEN -Dsonar.coverage.jacoco.xmlReportPaths=./target/site/jacoco/jacoco.xml + run: mvn -B verify sonar:sonar -Dsonar.projectKey=xsync -Dsonar.organization=antkorwin-github -Dsonar.host.url=https://sonarcloud.io -Dsonar.token=$SONAR_TOKEN -Dsonar.coverage.jacoco.xmlReportPaths=./target/site/jacoco/jacoco.xml From 7fbb325c3aab98a531b94492201a1cb653cbcceb Mon Sep 17 00:00:00 2001 From: Sergei Vorona Date: Thu, 3 Aug 2023 15:41:25 +1000 Subject: [PATCH 5/5] update sonar.yml --- .github/workflows/sonar.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/sonar.yml b/.github/workflows/sonar.yml index 9680759..6a64cf6 100644 --- a/.github/workflows/sonar.yml +++ b/.github/workflows/sonar.yml @@ -25,4 +25,4 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} # run sonar maven plugin: - run: mvn -B verify sonar:sonar -Dsonar.projectKey=xsync -Dsonar.organization=antkorwin-github -Dsonar.host.url=https://sonarcloud.io -Dsonar.token=$SONAR_TOKEN -Dsonar.coverage.jacoco.xmlReportPaths=./target/site/jacoco/jacoco.xml + run: mvn -B verify sonar:sonar -Dsonar.projectKey=antkorwin_xsync -Dsonar.organization=antkorwin-github -Dsonar.host.url=https://sonarcloud.io -Dsonar.token=$SONAR_TOKEN -Dsonar.coverage.jacoco.xmlReportPaths=./target/site/jacoco/jacoco.xml