Commit 80b089d2 authored by Jérome Perrin's avatar Jérome Perrin

ProcessingNodeTestCase: Disable alarms for timerserver_thread loop

parent 36c5b833
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
import errno, logging, os, socket, time import errno, logging, mock, os, socket, time
import itertools import itertools
from threading import Thread from threading import Thread
from UserDict import IterableUserDict from UserDict import IterableUserDict
...@@ -396,6 +396,14 @@ class ProcessingNodeTestCase(ZopeTestCase.TestCase): ...@@ -396,6 +396,14 @@ class ProcessingNodeTestCase(ZopeTestCase.TestCase):
""" """
import Products.TimerService import Products.TimerService
# AlarmTool uses alarmNode='' as a way to bootstrap an alarm node, but
# during these tests we don't want the first node to start executing
# alarms directly, because this usually cause conflicts when other
# nodes register.
with mock.patch(
'Products.ERP5.Tool.AlarmTool.AlarmTool.getAlarmNode',
return_value='bootstrap_disabled_in_test'):
timerserver_thread = None timerserver_thread = None
try: try:
while not Lifetime._shutdown_phase: while not Lifetime._shutdown_phase:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment