diff options
author | Ram Krishna Verma <ram_krishna.verma@bell.ca> | 2020-06-15 13:43:40 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2020-06-15 13:43:40 +0000 |
commit | 73470fb02d3d8a2fb37e80d9fb23a75955da32b5 (patch) | |
tree | 6460addf563cefb9264f7dd4fd3a847238b862cd /services/services-engine/src/main/java | |
parent | 808600494c5cd0f7b83460dac45d12b3ca14fd57 (diff) | |
parent | 718a1611a1e580ed7874088e1a0e013416334989 (diff) |
Merge "Improve robustness of unit testing"
Diffstat (limited to 'services/services-engine/src/main/java')
-rw-r--r-- | services/services-engine/src/main/java/org/onap/policy/apex/service/engine/engdep/EngDepMessageListener.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/services/services-engine/src/main/java/org/onap/policy/apex/service/engine/engdep/EngDepMessageListener.java b/services/services-engine/src/main/java/org/onap/policy/apex/service/engine/engdep/EngDepMessageListener.java index 2e8218a99..57c547b8c 100644 --- a/services/services-engine/src/main/java/org/onap/policy/apex/service/engine/engdep/EngDepMessageListener.java +++ b/services/services-engine/src/main/java/org/onap/policy/apex/service/engine/engdep/EngDepMessageListener.java @@ -77,7 +77,7 @@ public class EngDepMessageListener implements MessageListener<Message>, Runnable // The message listener thread and stopping flag private Thread messageListenerThread; - private boolean stopOrderedFlag = false; + private volatile boolean stopOrderedFlag = false; // The message queue is used to hold messages prior to forwarding to Apex private final BlockingQueue<MessageBlock<Message>> messageQueue = new LinkedBlockingDeque<>(); @@ -149,7 +149,7 @@ public class EngDepMessageListener implements MessageListener<Message>, Runnable @Override public void run() { // Take messages off the queue and forward them to the Apex engine - while (messageListenerThread.isAlive() && !stopOrderedFlag) { + while (!stopOrderedFlag) { pollAndHandleMessage(); } } |