|
20 | 20 |
|
21 | 21 |
|
22 | 22 | class Testcase(ABC):
|
23 |
| - CHECK_TIME_FOR_REACTION = 60 * 5 |
24 |
| - CHECK_TIME_FOR_SUBMIT_BUILDS = 60 * 45 |
25 |
| - CHECK_TIME_FOR_BUILD = 60 * 20 |
26 |
| - CHECK_TIME_FOR_WATCH_STATUSES = 60 * 30 |
| 23 | + CHECK_TIME_FOR_REACTION = 5 |
| 24 | + CHECK_TIME_FOR_SUBMIT_BUILDS = 45 |
| 25 | + CHECK_TIME_FOR_BUILD = 20 |
| 26 | + CHECK_TIME_FOR_WATCH_STATUSES = 30 |
27 | 27 |
|
28 | 28 | def __init__(
|
29 | 29 | self,
|
@@ -136,7 +136,7 @@ async def check_pending_check_runs(self):
|
136 | 136 | """
|
137 | 137 | status_names = [self.get_status_name(status) for status in self.get_statuses()]
|
138 | 138 |
|
139 |
| - watch_end = datetime.now(tz=timezone.utc) + timedelta(seconds=self.CHECK_TIME_FOR_REACTION) |
| 139 | + watch_end = datetime.now(tz=timezone.utc) + timedelta(minutes=self.CHECK_TIME_FOR_REACTION) |
140 | 140 | failure_message = (
|
141 | 141 | "Github check runs were not set to queued in time "
|
142 | 142 | "({self.CHECK_TIME_FOR_REACTION} minutes).\n"
|
@@ -195,7 +195,7 @@ async def check_build_submitted(self):
|
195 | 195 | self.trigger_build()
|
196 | 196 |
|
197 | 197 | watch_end = datetime.now(tz=timezone.utc) + timedelta(
|
198 |
| - seconds=self.CHECK_TIME_FOR_SUBMIT_BUILDS, |
| 198 | + minutes=self.CHECK_TIME_FOR_SUBMIT_BUILDS, |
199 | 199 | )
|
200 | 200 |
|
201 | 201 | await self.check_pending_check_runs()
|
@@ -249,7 +249,7 @@ async def check_build(self, build_id):
|
249 | 249 | Args:
|
250 | 250 | build_id: ID of the Copr build
|
251 | 251 | """
|
252 |
| - watch_end = datetime.now(tz=timezone.utc) + timedelta(seconds=self.CHECK_TIME_FOR_BUILD) |
| 252 | + watch_end = datetime.now(tz=timezone.utc) + timedelta(minutes=self.CHECK_TIME_FOR_BUILD) |
253 | 253 | state_reported = ""
|
254 | 254 | logging.info("Watching Copr build %s", build_id)
|
255 | 255 |
|
@@ -337,7 +337,7 @@ async def watch_statuses(self):
|
337 | 337 | return.
|
338 | 338 | """
|
339 | 339 | watch_end = datetime.now(tz=timezone.utc) + timedelta(
|
340 |
| - seconds=self.CHECK_TIME_FOR_WATCH_STATUSES, |
| 340 | + minutes=self.CHECK_TIME_FOR_WATCH_STATUSES, |
341 | 341 | )
|
342 | 342 | logging.info(
|
343 | 343 | "Watching statuses for commit %s",
|
|
0 commit comments