Commit 498508e
Fix race condition in WaitForInstanceAsync causing RestartAsync_EndToEnd test to fail
The original code had a TOCTOU race condition where a completion notification
could be missed if the orchestration completed between checking completion
status and adding the waiter. The fix reorders the operations to add the
waiter first, then check for completion.
Co-authored-by: YunchuWang <[email protected]>1 parent 134a166 commit 498508e
File tree
1 file changed
+8
-3
lines changed- src/InProcessTestHost/Sidecar
1 file changed
+8
-3
lines changedLines changed: 8 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
739 | 739 | | |
740 | 740 | | |
741 | 741 | | |
| 742 | + | |
| 743 | + | |
| 744 | + | |
| 745 | + | |
| 746 | + | |
| 747 | + | |
742 | 748 | | |
743 | 749 | | |
744 | 750 | | |
| |||
750 | 756 | | |
751 | 757 | | |
752 | 758 | | |
753 | | - | |
754 | | - | |
| 759 | + | |
| 760 | + | |
755 | 761 | | |
756 | 762 | | |
757 | 763 | | |
758 | 764 | | |
759 | 765 | | |
760 | 766 | | |
761 | 767 | | |
762 | | - | |
763 | 768 | | |
764 | 769 | | |
765 | 770 | | |
| |||
0 commit comments