From 7b84c15301abbca5ae586a6cbfcf482570a8c35f Mon Sep 17 00:00:00 2001 From: PatrikBuhr Date: Fri, 17 May 2019 06:19:25 +0000 Subject: Fix for robustness In the long time stability test it has showed that when there are an exessive amount of FileReady events, the DFC will fetch these from the MR and build up an internal queue. This has the effect that the DFC will consume too much memory. Itmight also affect load balancing (in case of several DFC instances) so that one might consume all events and the others get nothing. The DFC should not fetch new FileReady events when it fully loaded with work. Change-Id: I58665edd678d2f1c8a32d0e56455228b522aab40 Issue-ID: DCAEGEN2-1509 Signed-off-by: PatrikBuhr --- .../org/onap/dcaegen2/collectors/datafile/tasks/ScheduledTasksTest.java | 1 + 1 file changed, 1 insertion(+) (limited to 'datafile-app-server/src/test/java/org/onap') diff --git a/datafile-app-server/src/test/java/org/onap/dcaegen2/collectors/datafile/tasks/ScheduledTasksTest.java b/datafile-app-server/src/test/java/org/onap/dcaegen2/collectors/datafile/tasks/ScheduledTasksTest.java index 1a7db424..0d5a4231 100644 --- a/datafile-app-server/src/test/java/org/onap/dcaegen2/collectors/datafile/tasks/ScheduledTasksTest.java +++ b/datafile-app-server/src/test/java/org/onap/dcaegen2/collectors/datafile/tasks/ScheduledTasksTest.java @@ -202,6 +202,7 @@ public class ScheduledTasksTest { .verify(); // assertEquals(0, testedObject.getCurrentNumberOfTasks()); + assertEquals(0, testedObject.getThreadPoolQueueSize()); verify(consumerMock, times(1)).getMessageRouterResponse(); verify(fileCollectorMock, times(noOfFiles)).collectFile(notNull(), anyLong(), notNull(), notNull()); verify(dataRouterMock, times(noOfFiles)).publishFile(notNull(), anyLong(), notNull()); -- cgit 1.2.3-korg