private void awaitAndVerifyTraceCount(PluginTestVerifier verifier, int expectedTraceCount, long maxWaitMs) throws InterruptedException {
        final long waitIntervalMs = 100L;
        long maxWaitTime = maxWaitMs;
        if (maxWaitMs < waitIntervalMs) {
            maxWaitTime = waitIntervalMs;
        }
        long startTime = System.currentTimeMillis();
        while (System.currentTimeMillis() - startTime < maxWaitTime) {
            try {
                verifier.verifyTraceCount(expectedTraceCount);
                return;
            } catch (AssertionError e) {
                // ignore and retry
                Thread.sleep(waitIntervalMs);
            }
        }
        verifier.verifyTraceCount(expectedTraceCount);
    }
@author Jiaqi Feng
@author HyunGil Jeong
agent-module/plugins-it/rabbitmq-it/src/test/java/com/navercorp/pinpoint/it/plugin/rabbitmq/RabbitMQTestRunner.java