String consumerTag = channel.basicConsume(Q, true, c);
// publishes after an alarm should not go through
basicPublishVolatile(Q);
// the publish is async, so this is racy. This also tests we don't die
// by heartbeat (3x heartbeat interval + epsilon)
assertNull(c.nextDelivery(3100));
// once the alarm has cleared the publishes should go through
clearResourceAlarm("memory");
assertNotNull(c.nextDelivery(3100));
// everything should be back to normal
channel.basicCancel(consumerTag);