Changeset 61509 in vbox for trunk/src/VBox
- Timestamp:
- Jun 6, 2016 10:26:04 PM (9 years ago)
- Location:
- trunk/src/VBox/ValidationKit/testmanager
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/ValidationKit/testmanager/config.py
r61251 r61509 8 8 __copyright__ = \ 9 9 """ 10 Copyright (C) 2012-201 5Oracle Corporation10 Copyright (C) 2012-2016 Oracle Corporation 11 11 12 12 This file is part of VirtualBox Open Source Edition (OSE), as … … 93 93 94 94 95 ## @name Scheduling parameters 96 ## @{ 97 95 98 ## The time to wait for a gang to gather (in seconds). 96 g_kcSecGangGathering = 600;99 g_kcSecGangGathering = 600; 97 100 ## The max time allowed to spend looking for a new task (in seconds). 98 g_kcSecMaxNewTask = 60; 101 g_kcSecMaxNewTask = 60; 102 ## Minimum time since last task started. 103 g_kcSecMinSinceLastTask = 120; # (2 min) 104 ## Minimum time since last failed task. 105 g_kcSecMinSinceLastFailedTask = 180; # (3 min) 106 107 ## @} 108 99 109 100 110 -
trunk/src/VBox/ValidationKit/testmanager/core/testboxcontroller.py
r61502 r61509 568 568 # If idling and enabled try schedule a new task. 569 569 # 570 if fIdle \570 if fIdle \ 571 571 and oTestBoxData.fEnabled \ 572 and not TestSetLogic(oDb).isTestBoxExecutingToRapidly(oTestBoxData.idTestBox) \ 572 573 and oStatusData.enmState == TestBoxStatusData.ksTestBoxState_Idle: # (paranoia) 573 574 dResponse = SchedulerBase.scheduleNewTask(oDb, oTestBoxData, oStatusData.iWorkItem, self._oSrvGlue.getBaseUrl()); -
trunk/src/VBox/ValidationKit/testmanager/core/testset.py
r61480 r61509 711 711 return aoRet; 712 712 713 def isTestBoxExecutingToRapidly(self, idTestBox): 714 """ 715 Checks whether the specified test box is executing tests too rapidly. 716 717 The parameters defining too rapid execution are defined in config.py. 718 719 Returns True if it does, False if it doesn't. 720 May raise database problems. 721 """ 722 723 self._oDb.execute('(\n' 724 'SELECT tsCreated\n' 725 'FROM TestSets\n' 726 'WHERE idTestBox = %s\n' 727 ' AND tsCreated >= (CURRENT_TIMESTAMP - interval \'%s seconds\')\n' 728 ') UNION (\n' 729 'SELECT tsCreated\n' 730 'FROM TestSets\n' 731 'WHERE idTestBox = %s\n' 732 ' AND tsCreated >= (CURRENT_TIMESTAMP - interval \'%s seconds\')\n' 733 ' AND enmStatus >= \'failure\'\n' 734 ')' 735 , ( idTestBox, config.g_kcSecMinSinceLastTask, 736 idTestBox, config.g_kcSecMinSinceLastFailedTask, )); 737 return self._oDb.getRowCount() > 0; 738 713 739 714 740 #
Note:
See TracChangeset
for help on using the changeset viewer.