mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-10-11 06:40:53 +00:00
Make sure that queue is cleared properly after each test
This commit is contained in:
1 parent
a0f2fd0863
commit
9f47801d77
3 files changed
+9
-2
No files matched your search
+5
@@ -9,6 +9,7 @@ import java.util.List;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.rabbitmq.client.ConsumerCancelledException;
|
||||
import com.rabbitmq.client.QueueingConsumer;
|
||||
import com.rabbitmq.client.QueueingConsumer.Delivery;
|
||||
import com.rabbitmq.client.ShutdownSignalException;
|
||||
@@ -99,8 +100,12 @@ public class Replicator implements Runnable {
|
||||
new ByteArrayInputStream(bytesFromMessage));
|
||||
RacingEventServiceOperation<?> operation = (RacingEventServiceOperation<?>) ois.readObject();
|
||||
applyOrQueue(operation);
|
||||
} catch (ConsumerCancelledException cce) {
|
||||
logger.info("Consumer has been shut down properly.");
|
||||
break;
|
||||
} catch (InterruptedException irr) {
|
||||
logger.info("Application requested shutdown.");
|
||||
break;
|
||||
} catch (ShutdownSignalException sse) {
|
||||
/* make sure to respond to a stop event without waiting */
|
||||
if (isBeingStopped()) {
|
||||
|
||||
Reference in new issue
Block a user