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 {
127127
128128 publish (MSG [2 ]);
129129
130- assertEquals (MSG [1 ], new String ( get () ));
131- assertEquals (MSG [2 ], new String ( get () ));
130+ assertEquals (MSG [1 ], get ());
131+ assertEquals (MSG [2 ], get ());
132132
133133 }
134134
@@ -147,7 +147,7 @@ public void testTransactionalPublishWithGet() throws Exception {
147147 this .channel .txCommit ();
148148 Thread .sleep (50 );
149149
150- assertEquals (MSG [0 ], new String ( get () ));
150+ assertEquals (MSG [0 ], get ());
151151 Thread .sleep (80 );
152152
153153 assertNull (get ());
@@ -176,12 +176,9 @@ public void testExpiryWithRequeue() throws Exception {
176176 }
177177
178178
179- private byte [] get () throws IOException {
179+ private String get () throws IOException {
180180 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 ());
185182 }
186183
187184 private void publish (String msg ) throws IOException {
You can’t perform that action at this time.
0 commit comments