-
Notifications
You must be signed in to change notification settings - Fork 148
style: update qs times and wf names #1071
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 1 commit
6825ed4
f58b078
a43c340
568701c
77010ff
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -9,6 +9,7 @@ | |
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
| import uuid | ||
| from datetime import timedelta | ||
| from time import sleep | ||
|
|
||
|
|
@@ -31,8 +32,8 @@ | |
| child_orchestrator_count = 0 | ||
| child_orchestrator_string = '' | ||
| child_act_retry_count = 0 | ||
| instance_id = 'exampleInstanceID' | ||
| child_instance_id = 'childInstanceID' | ||
| instance_id = f'exampleInstanceID-{uuid.uuid4()}' | ||
| child_instance_id = f'childInstanceID-{uuid.uuid4()}' | ||
| workflow_name = 'hello_world_wf' | ||
| child_workflow_name = 'child_wf' | ||
| input_data = 'Hi Counter!' | ||
|
|
@@ -129,10 +130,10 @@ def main(): | |
| wf_client.wait_for_workflow_start(instance_id) | ||
|
|
||
| # Sleep to let the workflow run initial activities | ||
| sleep(12) | ||
| sleep(20) | ||
|
|
||
| assert counter == 11 | ||
| assert retry_count == 2 | ||
| assert counter >= 11 | ||
| assert retry_count >= 2 | ||
|
Comment on lines
+134
to
+135
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you explain this change?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I was actually thinking I'm not entirely sure how to address the flakiness issue here. I agree it might be confusing to ship flakey examples but at the same time it also illustrates that workflows are meant to handle flakey code. Maybe an explicit retry policy could help?
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do you know the reasons of those flaky errors? I think tests like this should be pretty consistent across runs, and I think it's safer to keep it fixed. For example, imagine we introduce a bug that triggers unnecessary retries and the |
||
| assert child_orchestrator_string == '1aa2bb3cc' | ||
|
|
||
| # Pause Test | ||
|
|
@@ -145,7 +146,7 @@ def main(): | |
| metadata = wf_client.get_workflow_state(instance_id=instance_id) | ||
| print(f'Get response from {workflow_name} after resume call: {metadata.runtime_status.name}') | ||
|
|
||
| sleep(2) # Give the workflow time to reach the event wait state | ||
| sleep(20) # Give the workflow time to reach the event wait state | ||
| wf_client.raise_workflow_event(instance_id=instance_id, event_name=event_name, data=event_data) | ||
|
|
||
| print('========= Waiting for Workflow completion', flush=True) | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.