Open chrisaddams opened 2 years ago
Made it compile with more recent JDK using this diff:
diff --git a/build.gradle b/build.gradle
index ab06c53..5b60204 100644
--- a/build.gradle
+++ b/build.gradle
@@ -1,6 +1,6 @@
plugins {
id 'java-library'
- id "io.freefair.lombok" version "5.3.0"
+ id "io.freefair.lombok" version "6.4.0"
id 'com.github.johnrengelman.shadow' version '6.1.0'
id 'maven-publish'
id 'signing'
diff --git a/src/main/java/software/amazon/msk/auth/iam/internals/AuthenticationResponse.java b/src/main/java/software/amazon/msk/auth/iam/internals/AuthenticationResponse.java
index e60eb83..fc35c16 100644
--- a/src/main/java/software/amazon/msk/auth/iam/internals/AuthenticationResponse.java
+++ b/src/main/java/software/amazon/msk/auth/iam/internals/AuthenticationResponse.java
@@ -25,7 +25,7 @@ import lombok.ToString;
/**
* This class is used to model the authentication response sent by the broker.
*/
-@Getter(onMethod = @__(@JsonIgnore))
+@Getter(onMethod_ = {@JsonIgnore})
@ToString
public class AuthenticationResponse {
private static final String VERSION_1 = "2020_10_22";
But still got test failures:
MSKCredentialProviderTest > testEc2CredsWithSixRetriableErrorsCustomRetry_ThrowsException() FAILED
org.mockito.exceptions.base.MockitoException at MSKCredentialProviderTest.java:519
Caused by: org.mockito.exceptions.base.MockitoException at MSKCredentialProviderTest.java:519
Caused by: java.lang.IllegalStateException at MSKCredentialProviderTest.java:519
Caused by: java.lang.IllegalArgumentException at MSKCredentialProviderTest.java:519
MSKCredentialProviderTest > testAwsRoleArn() FAILED
org.mockito.exceptions.base.MockitoException at MSKCredentialProviderTest.java:160
Caused by: org.mockito.exceptions.base.MockitoException at MSKCredentialProviderTest.java:160
Caused by: java.lang.IllegalStateException at MSKCredentialProviderTest.java:160
Caused by: java.lang.IllegalArgumentException at MSKCredentialProviderTest.java:160
MSKCredentialProviderTest > testRoleCredsWithThreeRetriableErrors() FAILED
org.mockito.exceptions.base.MockitoException at MSKCredentialProviderTest.java:504
Caused by: org.mockito.exceptions.base.MockitoException at MSKCredentialProviderTest.java:504
Caused by: java.lang.IllegalStateException at MSKCredentialProviderTest.java:504
Caused by: java.lang.IllegalArgumentException at MSKCredentialProviderTest.java:504
MSKCredentialProviderTest > testAwsRoleArnAndSessionName() FAILED
org.mockito.exceptions.base.MockitoException at MSKCredentialProviderTest.java:250
Caused by: org.mockito.exceptions.base.MockitoException at MSKCredentialProviderTest.java:250
Caused by: java.lang.IllegalStateException at MSKCredentialProviderTest.java:250
Caused by: java.lang.IllegalArgumentException at MSKCredentialProviderTest.java:250
MSKCredentialProviderTest > testEc2CredsWithDebuCredsNoAccessToSts_Succeed() FAILED
org.mockito.exceptions.base.MockitoException at MSKCredentialProviderTest.java:217
Caused by: org.mockito.exceptions.base.MockitoException at MSKCredentialProviderTest.java:217
Caused by: java.lang.IllegalStateException at MSKCredentialProviderTest.java:217
Caused by: java.lang.IllegalArgumentException at MSKCredentialProviderTest.java:217
MSKCredentialProviderTest > testProfileNameAndRoleArn() FAILED
org.mockito.exceptions.base.MockitoException at MSKCredentialProviderTest.java:305
Caused by: org.mockito.exceptions.base.MockitoException at MSKCredentialProviderTest.java:305
Caused by: java.lang.IllegalStateException at MSKCredentialProviderTest.java:305
Caused by: java.lang.IllegalArgumentException at MSKCredentialProviderTest.java:305
MSKCredentialProviderTest > testEc2CredsWithFiveRetriableErrorsCustomRetry() FAILED
org.mockito.exceptions.base.MockitoException at MSKCredentialProviderTest.java:519
Caused by: org.mockito.exceptions.base.MockitoException at MSKCredentialProviderTest.java:519
Caused by: java.lang.IllegalStateException at MSKCredentialProviderTest.java:519
Caused by: java.lang.IllegalArgumentException at MSKCredentialProviderTest.java:519
MSKCredentialProviderTest > testAwsRoleArnSessionNameAndStsRegion() FAILED
org.mockito.exceptions.base.MockitoException at MSKCredentialProviderTest.java:273
Caused by: org.mockito.exceptions.base.MockitoException at MSKCredentialProviderTest.java:273
Caused by: java.lang.IllegalStateException at MSKCredentialProviderTest.java:273
Caused by: java.lang.IllegalArgumentException at MSKCredentialProviderTest.java:273
MSKCredentialProviderTest > testEc2CredsWithOnrRetriableErrorsCustomZeroRetry_ThrowsException() FAILED
org.mockito.exceptions.base.MockitoException at MSKCredentialProviderTest.java:519
Caused by: org.mockito.exceptions.base.MockitoException at MSKCredentialProviderTest.java:519
Caused by: java.lang.IllegalStateException at MSKCredentialProviderTest.java:519
Caused by: java.lang.IllegalArgumentException at MSKCredentialProviderTest.java:519
MSKCredentialProviderTest > testRoleCredsWithFourRetriableErrors_ThrowsException() FAILED
org.mockito.exceptions.base.MockitoException at MSKCredentialProviderTest.java:504
Caused by: org.mockito.exceptions.base.MockitoException at MSKCredentialProviderTest.java:504
Caused by: java.lang.IllegalStateException at MSKCredentialProviderTest.java:504
Caused by: java.lang.IllegalArgumentException at MSKCredentialProviderTest.java:504
MSKCredentialProviderTest > testAwsRoleArnWithDebugCreds() FAILED
org.mockito.exceptions.base.MockitoException at MSKCredentialProviderTest.java:182
Caused by: org.mockito.exceptions.base.MockitoException at MSKCredentialProviderTest.java:182
Caused by: java.lang.IllegalStateException at MSKCredentialProviderTest.java:182
Caused by: java.lang.IllegalArgumentException at MSKCredentialProviderTest.java:182
MSKCredentialProviderTest > testEc2CredsWithTwoRetriableErrorsCustomRetry() FAILED
org.mockito.exceptions.base.MockitoException at MSKCredentialProviderTest.java:519
Caused by: org.mockito.exceptions.base.MockitoException at MSKCredentialProviderTest.java:519
Caused by: java.lang.IllegalStateException at MSKCredentialProviderTest.java:519
Caused by: java.lang.IllegalArgumentException at MSKCredentialProviderTest.java:519
MSKCredentialProviderTest > testRoleCredsWithTwoRetriableErrors() FAILED
org.mockito.exceptions.base.MockitoException at MSKCredentialProviderTest.java:504
Caused by: org.mockito.exceptions.base.MockitoException at MSKCredentialProviderTest.java:504
Caused by: java.lang.IllegalStateException at MSKCredentialProviderTest.java:504
Caused by: java.lang.IllegalArgumentException at MSKCredentialProviderTest.java:504
For anyone facing a similar issue with test as noted by strokyl, this is likely related to gradle version requiring compatible io.freefair.lombok
version and mockito-inline
version.
I am able to build and test latest main branch using following versions :
Gradle version 7.3.3
io.freefair.lombok version 6.6.3 (build.gradle file)
org.mockito:mockito-inline:5.2.0
openjdk 17.0.7 2023-04-18
I'm hitting an issue when cloning the repo and running either
gradle clean build
orgradle clean shadowJar
.The output I'm getting is as follows:
This is running using Java:17, and Gradle 7.3
I am able to get passed this stage by upgrading Lombok in
build.gradle
toid "io.freefair.lombok" version "6.5.0.3"
However, then I hit another error when running
gradle clean build
Whereas
gradle clean shadowJar
now outputs a successful build