Commit b445420
authored
Fixing non-deterministic consumer test (#195)
## Fixed Issue with Non-Deterministic Consumer Test
Resolved an issue that was causing non-deterministic behavior in
WebSocket consumer tests.
### Cause
The problem was due to using a shared `channel_layer` for message
passing between application instances over WebSocket. During test
execution, messages could leak between the test environment and the
running application, resulting in inconsistent test outcomes.
This wasn’t an issue when the application was not running, as only the
tests were using the `channel_layer`.
### Solution
The consumer tests were updated to use a separate `channel_layer`,
isolating the test environment from the running application. This
ensures the tests now behave deterministically and are not affected by
external interference.1 parent b4d67cc commit b445420
1 file changed
+7
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
30 | 36 | | |
31 | 37 | | |
32 | 38 | | |
| |||
45 | 51 | | |
46 | 52 | | |
47 | 53 | | |
48 | | - | |
| 54 | + | |
49 | 55 | | |
50 | 56 | | |
51 | 57 | | |
| |||
0 commit comments