Make the QoS test slightly more consistent 67/241167/1
authorMateusz Majewski <m.majewski2@samsung.com>
Tue, 18 Aug 2020 07:18:02 +0000 (09:18 +0200)
committerMateusz Majewski <m.majewski2@samsung.com>
Tue, 18 Aug 2020 07:45:12 +0000 (09:45 +0200)
Change-Id: I5a6ec0ec19dcf24260ae054322bf6d6046298883

tests/dlog_test.in

index 03b8372..eb39f5f 100644 (file)
@@ -771,22 +771,32 @@ if [ "$TEST_DYNAMIC_FILTERS" == "true" ]; then
                        LOGGER=$!
                        sleep 1
 
-                       dlogsend -b main -t DLOG_QOS_TEST0 -c 60 -d 1 -f 4 "A normal app that just wants to log"
+                       dlogsend -b main -t DLOG_QOS_TEST0 -c 30 -d 1 -f 2 "A normal app that just wants to log"
                        LOG_DETAILS="testing if QoS works (1/4)"
-                       [[ $(dlogutil -d DLOG_QOS_TEST0 | wc -l) -eq 60 ]] && ok || fail
+                       [[ $(dlogutil -d DLOG_QOS_TEST0 | wc -l) -eq 30 ]] && ok || fail
+                       kill $LOGGER > /dev/null
+                       sleep 1
+                       dlog_logger -b 99 -t 0 &
+                       LOGGER=$!
+                       sleep 1
 
                        dlogsend -b main -t DLOG_QOS_TEST1 -c 300 -d 1 -f 20 "Some log spam"
                        LOG_DETAILS="testing if QoS works (2/4)"
                        [[ $(dlogutil -d DLOG_QOS_TEST1 | wc -l) -le 180 ]] && ok || fail
+                       kill $LOGGER > /dev/null
+                       sleep 1
+                       dlog_logger -b 99 -t 0 &
+                       LOGGER=$!
+                       sleep 1
 
-                       dlogsend -b main -t DLOG_QOS_TEST2 -c 60 -d 1 -f 4 "A normal app that just wants to log" &
+                       dlogsend -b main -t DLOG_QOS_TEST2 -c 30 -d 1 -f 2 "A normal app that just wants to log" &
                        DLOGSEND_PID=$!
-                       dlogsend -b main -t DLOG_QOS_TEST3 -c 240 -d 1 -f 16 "Some log spam"
+                       dlogsend -b main -t DLOG_QOS_TEST3 -c 270 -d 1 -f 18 "Some log spam"
                        wait $DLOGSEND_PID
                        LOG_DETAILS="testing if QoS works (3/4)"
                        [[ $(dlogutil -d DLOG_QOS_TEST2 DLOG_QOS_TEST3 | wc -l) -le 180 ]] && ok || fail
                        LOG_DETAILS="testing if QoS works (4/4)"
-                       [[ $(dlogutil -d DLOG_QOS_TEST2 | wc -l) -gt 40 ]] && ok || fail
+                       [[ $(dlogutil -d DLOG_QOS_TEST2 | wc -l) -gt 24 ]] && ok || fail
 
                        DLOG_CONFIG_PATH=$PREQOS_CONFIG_PATH
                        kill $LOGGER > /dev/null