@timed(config.TEST_FB_LOGS_CLEANUP + 3)
    def test_watchdog_send_cleanup_logs(self):
        """Test if the watchdog send cleanup_logs"""

        m = Main()
        watchdogsock = m.get_watchdogsocket()

        # Empty logs
        watchdogsock.settimeout(0.1)
        try:
            while watchdogsock.recvfrom(4096):
                pass
        except socket.timeout:
            pass

        watchdogsock.settimeout(1)

        # Check if we got logs (maximum for TEST_FB_LOGS_CLEANUP+2 seconds)
        start = time.time()

        while time.time() < (start + config.TEST_FB_LOGS_CLEANUP + 2):
            try:
                frame, _ = watchdogsock.recvfrom(4096)
            except socket.timeout:
                frame = ''

            if frame != '':
                jframe = json.loads(frame)

                if jframe['type'] == 'cleanup_logs':
                    watchdogsock.close()
                    return
        watchdogsock.close()
        raise Exception("No cleanup_logs")
dataset/ETHPy150Open ebu/radiodns-plugit/RadioVisServer/tests.py/MainTests.test_watchdog_send_cleanup_logs/original