-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Include worker test in on-device test app
Exercise the `--worker` option in the on-device test app. This requires raising the SDK version to 30.
- Loading branch information
1 parent
1f02f85
commit 699eb3b
Showing
4 changed files
with
158 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#!/usr/bin/env python | ||
# -*- coding: utf-8 -*- | ||
|
||
import datetime | ||
import time | ||
|
||
from os import environ | ||
|
||
argument = environ.get('PYTHON_SERVICE_ARGUMENT', '') | ||
print( | ||
'app_worker.py was successfully called with argument: "{}"'.format( | ||
argument, | ||
), | ||
) | ||
|
||
try: | ||
duration = int(argument) | ||
except ValueError: | ||
duration = 60 | ||
|
||
print('Running the test worker for {} seconds'.format(duration)) | ||
while duration > 0: | ||
print(duration, 'seconds remaining') | ||
duration -= 1 | ||
time.sleep(1) | ||
print('Exiting the test worker') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters