Skip to content

Commit 4203b6f

Browse files
committed
Delete super stream topology at the end of test
1 parent f1fbda2 commit 4203b6f

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

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

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -134,11 +134,15 @@ void partitionsAndRouteShouldNotReturnNonStreamQueue() throws Exception {
134134
void partitionsReturnsCorrectOrder() throws Exception {
135135
String[] partitionNames = {"z", "y", "x"};
136136
declareSuperStreamTopology(connection, superStream, partitionNames);
137-
Client client = cf.get();
138-
List<String> streams = client.partitions(superStream);
139-
assertThat(streams)
140-
.hasSize(partitions)
141-
.containsSequence(
142-
Arrays.stream(partitionNames).map(p -> superStream + "-" + p).toArray(String[]::new));
137+
try {
138+
Client client = cf.get();
139+
List<String> streams = client.partitions(superStream);
140+
assertThat(streams)
141+
.hasSize(partitions)
142+
.containsSequence(
143+
Arrays.stream(partitionNames).map(p -> superStream + "-" + p).toArray(String[]::new));
144+
} finally {
145+
deleteSuperStreamTopology(connection, superStream, partitionNames);
146+
}
143147
}
144148
}

0 commit comments

Comments
 (0)