Repository navigation
Commit 520dd41
authored
fix(tests): harden journeys against container network changes (#1690)
## Why
Main's [failed Ubuntu
run](https://github.com/IntelliTect/EssentialCSharp.Web/actions/runs/44303044493/job/134797768441)
dropped same-origin scripts with `net::ERR_NETWORK_CHANGED`. Without
`hcaptcha-form.js`, login posted without a captcha token and the
journeys timed out waiting for `#logout`. The same failure occurred
before the Aspire package update in #1688.
## Approach
- Move the second-AppHost smoke test into its own `ParallelGroup`,
isolating its container-network creation and teardown from browser
journeys without serializing the journeys themselves.
- Allow journey navigation up to three attempts when same-origin
resources fail at the network level. Log retries and report accumulated
failures when recovery is exhausted. Intentional `ERR_ABORTED`
cancellations are excluded; HTTP errors are not grounds for retrying.
The second AppHost is a likely trigger, not a proven explanation for
every CI occurrence. Isolation applies within this test assembly.
Bounded reloads address transient failures, not continuous network
churn.
## Local evidence
- All 28 AppHost tests passed with no skips on Windows with Linux
containers. TRX timestamps show the second AppHost starting after every
journey finished.
- Linux Chromium in Podman: no-churn baseline had 0/10 broken loads.
Bursty container-network changes caused 3/20 broken loads without
retries and 0/20 with retries. Continuous churn still exhausted retries
in 15/15 loads.
- Temporary fault injection reproduced the captcha rejection without
recovery and authenticated successfully with recovery. Persistent script
failures produced bounded diagnostics. The recovery probe's
request-count assertion failed (3 requests rather than 2), despite
successful login; the temporary probes were removed.
The real Linux CI suite still needs to confirm the improvement; the
Windows test run does not reproduce Chromium's Linux network-change
behavior.
## References
- [TUnit parallel-group
semantics](https://tunit.dev/docs/execution/parallelism/)
-
[microsoft/aspire#8346](microsoft/aspire#8346),
which added page reloads for the same browser error1 parent f299dd1 commit 520dd41
2 files changed
Lines changed: 78 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
1 | 2 | | |
2 | 3 | | |
3 | 4 | | |
| |||
105 | 106 | | |
106 | 107 | | |
107 | 108 | | |
108 | | - | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
109 | 162 | | |
110 | 163 | | |
111 | 164 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
55 | 79 | | |
56 | 80 | | |
57 | 81 | | |
| |||
66 | 90 | | |
67 | 91 | | |
68 | 92 | | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | 93 | | |
0 commit comments