|
1 | | -// Copyright (c) 2020-2021 VMware, Inc. or its affiliates. All rights reserved. |
| 1 | +// Copyright (c) 2020-2023 VMware, Inc. or its affiliates. All rights reserved. |
2 | 2 | // |
3 | 3 | // This software, the RabbitMQ Stream Java client library, is dual-licensed under the |
4 | 4 | // Mozilla Public License 2.0 ("MPL"), and the Apache License version 2 ("ASL"). |
|
21 | 21 | import com.rabbitmq.stream.Constants; |
22 | 22 | import com.rabbitmq.stream.Host; |
23 | 23 | import com.rabbitmq.stream.impl.Client.Broker; |
| 24 | +import com.rabbitmq.stream.impl.TestUtils.BrokerVersion; |
| 25 | +import com.rabbitmq.stream.impl.TestUtils.BrokerVersionAtLeast; |
24 | 26 | import java.io.IOException; |
25 | 27 | import java.net.InetAddress; |
26 | 28 | import java.net.UnknownHostException; |
27 | 29 | import java.util.*; |
28 | 30 | import java.util.function.BooleanSupplier; |
29 | 31 | import java.util.stream.Collectors; |
30 | 32 | import java.util.stream.IntStream; |
31 | | -import org.junit.jupiter.api.Disabled; |
32 | 33 | import org.junit.jupiter.api.Test; |
33 | 34 | import org.junit.jupiter.api.TestInfo; |
34 | 35 | import org.junit.jupiter.api.extension.ExtendWith; |
@@ -158,9 +159,8 @@ static String hostname() { |
158 | 159 | } |
159 | 160 | } |
160 | 161 |
|
161 | | - // TODO enable this test when the server fix is available |
162 | 162 | @Test |
163 | | - @Disabled |
| 163 | + @BrokerVersionAtLeast(BrokerVersion.RABBITMQ_3_11_7) |
164 | 164 | void shouldFilterOutNodesInMaintenance() throws Exception { |
165 | 165 | Client client = cf.get(); |
166 | 166 | BooleanSupplier hasLeader = () -> client.metadata(stream).get(stream).getLeader() != null; |
|
0 commit comments