diff --git a/src/opticalattackdetector/tests/test_unitary.py b/src/opticalattackdetector/tests/test_unitary.py
index 4be13d52913969d09f24b8787e711c24eefa9ebf..0112ec75cac40e527390ed1991db7092461bdc1a 100644
--- a/src/opticalattackdetector/tests/test_unitary.py
+++ b/src/opticalattackdetector/tests/test_unitary.py
@@ -15,6 +15,7 @@
 import logging
 import uuid
 import queue
+import time
 from unittest.mock import patch
 
 import pytest
@@ -36,6 +37,7 @@ LOGGER = logging.getLogger(__name__)
 def optical_attack_detector_service():
     _service = OpticalAttackDetectorService()
     _service.start()
+    time.sleep(2)
     yield _service
     _service.stop()