Skip to content

Commit cd9ceb4

Browse files
committed
Remove synchronized on method, loosen test
The synchronized on the method is a leftover. Loosening the test still triggers the deadlock without the fix, it should help on slow CI environments. References #49
1 parent 3f30b17 commit cd9ceb4

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/main/java/com/rabbitmq/stream/impl/ConsumersCoordinator.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -720,7 +720,7 @@ void add(
720720
}
721721
}
722722

723-
synchronized void remove(SubscriptionTracker subscriptionTracker) {
723+
void remove(SubscriptionTracker subscriptionTracker) {
724724
synchronized (this.owner) {
725725

726726
// FIXME check manager is still open (not closed because of connection failure)

src/test/java/com/rabbitmq/stream/impl/ConsumersCoordinatorTest.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -1193,15 +1193,15 @@ void subscribeUnsubscribeInDifferentThreadsShouldNotDeadlock() throws Exception
11931193
executorService.submit(
11941194
() -> {
11951195
int count = 0;
1196-
while (count++ < 100) {
1196+
while (count++ < 10) {
11971197
subUnsub.run();
11981198
}
11991199
latch.countDown();
12001200
});
12011201
executorService.submit(
12021202
() -> {
12031203
int count = 0;
1204-
while (count++ < 100) {
1204+
while (count++ < 10) {
12051205
subUnsub.run();
12061206
}
12071207
latch.countDown();

0 commit comments

Comments
 (0)