File tree Expand file tree Collapse file tree 1 file changed +5
-8
lines changed
test/src/com/rabbitmq/client/test/functional Expand file tree Collapse file tree 1 file changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -127,8 +127,8 @@ public void testPublishAndGetWithExpiry() throws Exception {
127
127
128
128
publish (MSG [2 ]);
129
129
130
- assertEquals (MSG [1 ], new String ( get () ));
131
- assertEquals (MSG [2 ], new String ( get () ));
130
+ assertEquals (MSG [1 ], get ());
131
+ assertEquals (MSG [2 ], get ());
132
132
133
133
}
134
134
@@ -147,7 +147,7 @@ public void testTransactionalPublishWithGet() throws Exception {
147
147
this .channel .txCommit ();
148
148
Thread .sleep (50 );
149
149
150
- assertEquals (MSG [0 ], new String ( get () ));
150
+ assertEquals (MSG [0 ], get ());
151
151
Thread .sleep (80 );
152
152
153
153
assertNull (get ());
@@ -176,12 +176,9 @@ public void testExpiryWithRequeue() throws Exception {
176
176
}
177
177
178
178
179
- private byte [] get () throws IOException {
179
+ private String get () throws IOException {
180
180
GetResponse response = basicGet (TTL_QUEUE_NAME );
181
- if (response == null ) {
182
- return null ;
183
- }
184
- return response .getBody ();
181
+ return response == null ? null : new String (response .getBody ());
185
182
}
186
183
187
184
private void publish (String msg ) throws IOException {
You can’t perform that action at this time.
0 commit comments