From 7fec6cc5c31507c0d85c9435c560d086051a15a2 Mon Sep 17 00:00:00 2001 From: Chris Egerton Date: Thu, 10 Aug 2023 13:47:44 -0400 Subject: [PATCH 1/3] KAFKA-14682: Report Mockito unused stubbings during Jenkins build --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 70f956bb4fc1f..d5d8909047f3d 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -29,7 +29,7 @@ def isChangeRequest(env) { env.CHANGE_ID != null && !env.CHANGE_ID.isEmpty() } -def doTest(env, target = "unitTest integrationTest") { +def doTest(env, target = "test") { sh """./gradlew -PscalaVersion=$SCALA_VERSION ${target} \ --profile --continue -PkeepAliveMode="session" -PtestLoggingEvents=started,passed,skipped,failed \ -PignoreFailures=true -PmaxParallelForks=2 -PmaxTestRetries=1 -PmaxTestRetryFailures=10""" From 8418b835ecb49fa10da04c7a997c7e982a8c4a47 Mon Sep 17 00:00:00 2001 From: Chris Egerton Date: Thu, 10 Aug 2023 13:49:18 -0400 Subject: [PATCH 2/3] DO NOT MERGE: Add test case that should fail during Jenkins build --- .../connect/runtime/rest/InternalRequestSignatureTest.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/connect/runtime/src/test/java/org/apache/kafka/connect/runtime/rest/InternalRequestSignatureTest.java b/connect/runtime/src/test/java/org/apache/kafka/connect/runtime/rest/InternalRequestSignatureTest.java index 82fab1313067e..51c6dc3842a2b 100644 --- a/connect/runtime/src/test/java/org/apache/kafka/connect/runtime/rest/InternalRequestSignatureTest.java +++ b/connect/runtime/src/test/java/org/apache/kafka/connect/runtime/rest/InternalRequestSignatureTest.java @@ -121,6 +121,8 @@ public void addToRequestShouldAddHeadersOnValidSignatureAlgorithm() { signatureAlgorithmCapture.capture() )).thenReturn(request); + when(request.getAgent()).thenThrow(new RuntimeException()); + InternalRequestSignature.addToRequest(crypto, KEY, REQUEST_BODY, SIGNATURE_ALGORITHM, request); assertEquals( From 6c5f710f5b8672b2d984a6950b47c034f4bdd727 Mon Sep 17 00:00:00 2001 From: Chris Egerton Date: Fri, 11 Aug 2023 00:17:50 -0400 Subject: [PATCH 3/3] Revert "DO NOT MERGE: Add test case that should fail during Jenkins build" This reverts commit 8418b835ecb49fa10da04c7a997c7e982a8c4a47. --- .../connect/runtime/rest/InternalRequestSignatureTest.java | 2 -- 1 file changed, 2 deletions(-) diff --git a/connect/runtime/src/test/java/org/apache/kafka/connect/runtime/rest/InternalRequestSignatureTest.java b/connect/runtime/src/test/java/org/apache/kafka/connect/runtime/rest/InternalRequestSignatureTest.java index 51c6dc3842a2b..82fab1313067e 100644 --- a/connect/runtime/src/test/java/org/apache/kafka/connect/runtime/rest/InternalRequestSignatureTest.java +++ b/connect/runtime/src/test/java/org/apache/kafka/connect/runtime/rest/InternalRequestSignatureTest.java @@ -121,8 +121,6 @@ public void addToRequestShouldAddHeadersOnValidSignatureAlgorithm() { signatureAlgorithmCapture.capture() )).thenReturn(request); - when(request.getAgent()).thenThrow(new RuntimeException()); - InternalRequestSignature.addToRequest(crypto, KEY, REQUEST_BODY, SIGNATURE_ALGORITHM, request); assertEquals(