Skip to content

Commit 70dac90

Browse files
committed
Get broker version only if connection is open
(cherry picked from commit 3ecf0c5)
1 parent 1715d7b commit 70dac90

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/test/java/com/rabbitmq/client/test/BrokerTestCase.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,9 @@ public void setUp(TestInfo testInfo) throws IOException, TimeoutException {
6868
Assumptions.assumeTrue(shouldRun());
6969
this.testInfo = testInfo;
7070
openConnection();
71-
this.brokerVersion = currentVersion(this.connection.getServerProperties().get("version").toString());
71+
if (this.connection != null) {
72+
this.brokerVersion = currentVersion(this.connection.getServerProperties().get("version").toString());
73+
}
7274
openChannel();
7375

7476
createResources();

0 commit comments

Comments
 (0)