NO-JIRA: fix now-obvious fault in test from 55f0680a3c0c2ac2c8e8df51496873c16b60f2f8, which never showed up locally once in lots of runs but did on the first go in multiple CI envs/jobs
diff --git a/qpid-jms-client/src/test/java/org/apache/qpid/jms/integration/ConsumerIntegrationTest.java b/qpid-jms-client/src/test/java/org/apache/qpid/jms/integration/ConsumerIntegrationTest.java
index cc1c8c1..e0e751c 100644
--- a/qpid-jms-client/src/test/java/org/apache/qpid/jms/integration/ConsumerIntegrationTest.java
+++ b/qpid-jms-client/src/test/java/org/apache/qpid/jms/integration/ConsumerIntegrationTest.java
@@ -2393,8 +2393,6 @@
 
             List<String> receivedPayloads = new ArrayList<>();
 
-            MessageConsumer consumer = session.createConsumer(destination);
-
             // Await the messages being prefetched before we set the listener to make the
             // test viable, ongoing prefetching would make the reordering non-deterministic.
             ((JmsConnection) connection).addConnectionListener(new JmsDefaultConnectionListener() {
@@ -2404,6 +2402,8 @@
                 }
             });
 
+            MessageConsumer consumer = session.createConsumer(destination);
+
             boolean awaitPrefetch = arrived.await(15, TimeUnit.SECONDS);
             assertTrue("Messages not prefetched within given timeout, outstanding: " + arrived.getCount(), awaitPrefetch);