Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TemplateTest.testMultipleClusterSizes fails Expected size: 2 but was: 3 in: #294

Open
k-wall opened this issue Mar 19, 2024 · 2 comments
Open
Labels
bug Something isn't working

Comments

@k-wall
Copy link
Contributor

k-wall commented Mar 19, 2024

Please use this to only for bug reports. For questions or when you need help, you can use the GitHub Discussions or use the community Slack chat.

Describe the bug

A CI run produced a test failure.

Error:  io.kroxylicious.testing.kafka.junit5ext.TemplateTest.testMultipleClusterSizes(KafkaCluster)[2] -- Time elapsed: 1.355 s <<< FAILURE!
java.lang.AssertionError: 

Expected size: 2 but was: 3 in:
[localhost:13146 (id: 0 rack: null),
    localhost:18782 (id: 1 rack: null),
    localhost:27093 (id: 2 rack: null)]
	at io.kroxylicious.testing.kafka.junit5ext.TemplateTest.testMultipleClusterSizes(TemplateTest.java:66)
	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
	at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183)

To Reproduce
Steps to reproduce the behavior:

  1. Use kroxylicious-junit5-extension like this ...
  2. Run command '....'
  3. See error

Expected behavior
A clear and concise description of what you expected to happen.

Logs

Attach or copy and paste relevant logs.

Additional context
Add any other context about the problem here.

@k-wall k-wall added the bug Something isn't working label Mar 19, 2024
@k-wall
Copy link
Contributor Author

k-wall commented Mar 19, 2024

From a very quick look, it wasn't obvious how the test could fail in this way.
AFAIK we haven't seen this failure before.

logs_21818831997.zip

@k-wall
Copy link
Contributor Author

k-wall commented Jul 5, 2024

It looks like the same thing happened again. Again, I don't see how this is possible. We can see from the logs that three brokers have started. So how can cluster.getNumOfBrokers() be returning 2. Maybe a publication issue someplace?

2024-06-24T05:25:46.8856355Z metaPropertiesEnsemble=MetaPropertiesEnsemble(metadataLogDir=Optional.empty, dirs={/tmp/kafka18061599160262552516/broker-0: EMPTY})
2024-06-24T05:25:47.3088109Z metaPropertiesEnsemble=MetaPropertiesEnsemble(metadataLogDir=Optional.empty, dirs={/tmp/kafka14055468147697681944/broker-0: EMPTY})
2024-06-24T05:25:47.7092154Z metaPropertiesEnsemble=MetaPropertiesEnsemble(metadataLogDir=Optional.empty, dirs={/tmp/kafka3633042204599712834/broker-1: EMPTY})
2024-06-24T05:25:47.7094906Z metaPropertiesEnsemble=MetaPropertiesEnsemble(metadataLogDir=Optional.empty, dirs={/tmp/kafka3633042204599712834/broker-2: EMPTY})
2024-06-24T05:25:47.7097462Z metaPropertiesEnsemble=MetaPropertiesEnsemble(metadataLogDir=Optional.empty, dirs={/tmp/kafka3633042204599712834/broker-0: EMPTY})
2024-06-24T05:25:49.4187776Z metaPropertiesEnsemble=MetaPropertiesEnsemble(metadataLogDir=Optional.empty, dirs={/tmp/kafka18152416472765910495/broker-1: EMPTY})
2024-06-24T05:25:49.4199239Z metaPropertiesEnsemble=MetaPropertiesEnsemble(metadataLogDir=Optional.empty, dirs={/tmp/kafka18152416472765910495/broker-0: EMPTY})
2024-06-24T05:25:49.4202579Z metaPropertiesEnsemble=MetaPropertiesEnsemble(metadataLogDir=Optional.empty, dirs={/tmp/kafka18152416472765910495/broker-2: EMPTY})
2024-06-24T05:25:51.1973643Z [ERROR] Tests run: 5, Failures: 2, Errors: 0, Skipped: 0, Time elapsed: 4.360 s <<< FAILURE! -- in io.kroxylicious.testing.kafka.junit5ext.TemplateTest$CartesianProduct
2024-06-24T05:25:51.1986001Z [ERROR] io.kroxylicious.testing.kafka.junit5ext.TemplateTest$CartesianProduct.testCartesianProduct(KafkaCluster, Admin)[4] -- Time elapsed: 1.801 s <<< FAILURE!
2024-06-24T05:25:51.1987736Z org.opentest4j.AssertionFailedError: 
2024-06-24T05:25:51.1988390Z [Expected cluster to have 2 nodes] 
2024-06-24T05:25:51.1988940Z expected: 2
2024-06-24T05:25:51.1989346Z  but was: 3
2024-06-24T05:25:51.1990466Z 	at io.kroxylicious.testing.kafka.junit5ext.TemplateTest$CartesianProduct.testCartesianProduct(TemplateTest.java:106)
2024-06-24T05:25:51.1991980Z 	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
2024-06-24T05:25:51.1993161Z 	at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183)
2024-06-24T05:25:51.1994556Z 	at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197)
2024-06-24T05:25:51.1995974Z 	at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:179)
2024-06-24T05:25:51.1997334Z 	at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197)
2024-06-24T05:25:51.1998683Z 	at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183)
2024-06-24T05:25:51.2000007Z 	at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197)
2024-06-24T05:25:51.2001691Z 	at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1625)
2024-06-24T05:25:51.2003451Z 	at java.base/java.util.stream.Streams$ConcatSpliterator.forEachRemaining(Streams.java:734)
2024-06-24T05:25:51.2004824Z 	at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509)
2024-06-24T05:25:51.2005885Z 	at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
2024-06-24T05:25:51.2006717Z 	at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150)
2024-06-24T05:25:51.2007554Z 	at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173)
2024-06-24T05:25:51.2008928Z 	at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
2024-06-24T05:25:51.2009948Z 	at java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:596)
2024-06-24T05:25:51.2011769Z 	at java.base/java.util.stream.ReferencePipeline$7$1.accept(ReferencePipeline.java:276)
2024-06-24T05:25:51.2012624Z 	at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1625)
2024-06-24T05:25:51.2013874Z 	at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509)
2024-06-24T05:25:51.2015130Z 	at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
2024-06-24T05:25:51.2016510Z 	at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150)
2024-06-24T05:25:51.2018254Z 	at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173)
2024-06-24T05:25:51.2019734Z 	at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
2024-06-24T05:25:51.2021071Z 	at java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:596)
2024-06-24T05:25:51.2022211Z 	at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
2024-06-24T05:25:51.2023082Z 	at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
2024-06-24T05:25:51.2023928Z 	at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
2024-06-24T05:25:51.2024523Z 

logs_25228749671.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant