Skip to content
This repository was archived by the owner on Jan 24, 2024. It is now read-only.
This repository was archived by the owner on Jan 24, 2024. It is now read-only.

[BUG] testMutiBrokerUnloadReload cannot pass #252

@BewareMyPower

Description

@BewareMyPower

Describe the bug
We disabled the DistributedClusterTest in #207 because these tests cannot pass in CI environment though they can pass in local environment. The track issue is #184 .

However, I found the testMutiBrokerUnloadReload cannot pass even in local environment. The other two tests of DistributedClusterTest work well.

To Reproduce
Steps to reproduce the behavior:

$ mvn clean install -DskipTests
$ mvn test '-Dtest=DistributedClusterTest#testMutiBrokerUnloadReload' -pl tests

Then the test timed out:

[ERROR] testMutiBrokerUnloadReload(io.streamnative.pulsar.handlers.kop.DistributedClusterTest)  Time elapsed: 30.013 s  <<< FAILURE!
org.testng.internal.thread.ThreadTimeoutException: Method io.streamnative.pulsar.handlers.kop.DistributedClusterTest.testMutiBrokerUnloadReload() didn't finish within the time-out 30000
	at java.util.concurrent.locks.ReentrantLock.unlock(ReentrantLock.java:457)
	at org.apache.kafka.clients.consumer.internals.ConsumerNetworkClient.poll(ConsumerNetworkClient.java:299)
	at org.apache.kafka.clients.consumer.internals.ConsumerNetworkClient.poll(ConsumerNetworkClient.java:242)
	at org.apache.kafka.clients.consumer.KafkaConsumer.pollForFetches(KafkaConsumer.java:1247)
	at org.apache.kafka.clients.consumer.KafkaConsumer.poll(KafkaConsumer.java:1187)
	at org.apache.kafka.clients.consumer.KafkaConsumer.poll(KafkaConsumer.java:1154)
	at io.streamnative.pulsar.handlers.kop.DistributedClusterTest.kafkaConsumeCommitMessage(DistributedClusterTest.java:237)
	at io.streamnative.pulsar.handlers.kop.DistributedClusterTest.testMutiBrokerUnloadReload(DistributedClusterTest.java:447)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:124)
	at org.testng.internal.InvokeMethodRunnable.runOne(InvokeMethodRunnable.java:54)
	at org.testng.internal.InvokeMethodRunnable.run(InvokeMethodRunnable.java:44)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)

Expected behavior
testMutiBrokerUnloadReload should pass.

Additional context
The issue seems to be introduced from #193 , see following two commits:

d684f4bd295ed686aa6c6f371864f29f91c02e00 (HEAD -> upstream-master) remove unnecessary register producer (#193)
57a3cac44e55b0cb2c5d881cfe3db250a001c721 Add Kafka version coverage tests (#196)

When I reset to 57a3cac and run test again, it succeed.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions