This is an automated email from the ASF dual-hosted git repository.

ableegoldman pushed a commit to branch 2.8
in repository https://gitbox.apache.org/repos/asf/kafka.git


The following commit(s) were added to refs/heads/2.8 by this push:
     new 03d5a8a  HOTFIX: fix backport of #11248 by future-proofing the 
EmbeddedKafkaCluster (#11257)
03d5a8a is described below

commit 03d5a8aadae5769b0846a1e2c45f0418fe3991bb
Author: A. Sophie Blee-Goldman <[email protected]>
AuthorDate: Tue Aug 24 20:21:13 2021 -0700

    HOTFIX: fix backport of #11248 by future-proofing the EmbeddedKafkaCluster 
(#11257)
    
    A backport of #11248 broke the 2.8 build due to usage of the 
EmbeddedKafkaCluster#stop method, which used to be private. It seems we made 
this public when we upgraded to JUnit5 on the 3.0 branch and had to remove the 
ExternalResource that was previously responsible for calling start() and stop() 
for this class using the no-longer-available @ClassRule annotation.
    
    Rather than adapt this test to the 2.8 style by migrating it to use 
@ClassRule as well, I opted to just make the stop() method public as well 
(since its analogue start()` has always been public anyways). This should 
hopefully prevent any future backports that include integration tests from 
having to manually go in and adapt the test, or accidentally break the build as 
happened here.
    
    Reviewers: Luke Chen <[email protected]>
---
 .../apache/kafka/streams/integration/utils/EmbeddedKafkaCluster.java    | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/streams/src/test/java/org/apache/kafka/streams/integration/utils/EmbeddedKafkaCluster.java
 
b/streams/src/test/java/org/apache/kafka/streams/integration/utils/EmbeddedKafkaCluster.java
index af83248..ec7e2e2 100644
--- 
a/streams/src/test/java/org/apache/kafka/streams/integration/utils/EmbeddedKafkaCluster.java
+++ 
b/streams/src/test/java/org/apache/kafka/streams/integration/utils/EmbeddedKafkaCluster.java
@@ -119,7 +119,7 @@ public class EmbeddedKafkaCluster extends ExternalResource {
     /**
      * Stop the Kafka cluster.
      */
-    private void stop() {
+    public void stop() {
         if (brokers.length > 1) {
             // delete the topics first to avoid cascading leader elections 
while shutting down the brokers
             final Set<String> topics = getAllTopicsInCluster();

Reply via email to