action #59100
closed
Race condition in os-autoinst/commands.pm
Added by tinita almost 5 years ago.
Updated almost 5 years ago.
Category:
Regressions/Crashes
Description
If I put a sleep 3
into the following code, then the t/full-stack.t test is failing.
Mojo::IOLoop->singleton->reactor->io($isotovideo => sub {
my ($reactor, $writable) = @_;
my @isotovideo_responses = myjsonrpc::read_json($isotovideo, undef, 1);
sleep 3; # <-------------------------------------------
...
})->watch($isotovideo, 1, 0); # watch only readable (and not writable)
The set_pause_at_test
is sent via myjsonrpc::send_json()
, but never read via read_json()
.
https://github.com/os-autoinst/os-autoinst/blob/master/commands.pm#L325-L339
- Category set to Regressions/Crashes
t/full-stack.t .. 17/? # javascript console output: [
# {
# level => "SEVERE",
# message => "http://localhost:53373/asset/e27d1d8f48/ws_console.js 8 WebSocket connection to 'ws://127.0.0.1:20013/m6P3p9XyFV85QKzg/ws' failed: Error in connection establishment: net::ERR_CONNECTION_REFUSED",
# source => "javascript",
# timestamp => 1572950485996,
# },
# ]
...
# Failed test 'no errors or warnings on javascript console, waiting for resume'
# at /home/tina/openqa-devel/repos/openQA/t/lib/OpenQA/SeleniumTest.pm line 260.
# Looks like you failed 3 tests of 85.
t/full-stack .. 18/?
# Failed test 'pause at certain test'
# at t/full-stack.t line 204.
This can be fixed by adding:
# start of callback
$reactor->stop;
...
# end of callback
$reactor->start;
Edit:
According to Sebastian Riedel the suggested fix is wrong, and the bug is somewhere else
- Related to action #59043: Fix unstable/flaky full-stack test, i.e. remove sleep, and ui tests added
- Description updated (diff)
- Status changed from New to Rejected
Bug is elsewhere, see related ticket
Also available in: Atom
PDF