Commit 9dfca8f
authored
Avoid race between visit tests (#310)
TurboDriveTestCase maintains a eventLogChannel that acts as a cursor
for the page's window.eventLogs array. Before every test the
eventLogChannel is drained by reading all events and its internal
index (cursor) is updated accordingly.
The race was happening when we changed the page location and not
blocking on it: the eventLogChannel was draining the previous page
bumping its internal index. After the page was reload that index was
out of sync since the new page had an new, empty eventLogs array.
Order of events
* async location change
* draining eventLogChannel on the previous page
* actual location change
* eventLogChannel is out-of-sync
This is was fixed as part of #2891 parent a84d25d commit 9dfca8f
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| |||
0 commit comments