MDEV-41212: multi_source.status_vars fails on MacOS platform - #5703
DaveGosselin-MariaDB wants to merge 1 commit into
Conversation
Replace the two recorded reads of Slave_received_heartbeats with an assertion that the counter is nonzero. The counter advances once per heartbeat period for as long as the connection is running. The test waited for it to reach 2 and then read it again in a separate query, so a heartbeat arriving between those two queries recorded an unexpected value.
| # The units are tens of seconds | ||
| --let $status_timeout = 30 | ||
| --source include/wait_for_status_var.inc | ||
| show status like 'Slave_received_heartbeats'; |
There was a problem hiding this comment.
This will only fix the first problem reported in MDEV-41212 (the mismatch), but not the second one, dying while waiting:
mysqltest: In included file "./include/wait_for_status_var.inc":
included from /Users/ec2-user/buildbot/prod/aarch64-macos/build/mysql-test/suite/multi_source/status_vars.test at line 75:
At line 88: Explicit --die command executed
In this case it fails on the previous line, apparently because by the time the wait for "2" starts, there are already at least 3 heartbeats in the status variable, so it keeps waiting, hits the timeout, and dies -- never reaching the showdown query.
| --let $status_var_value = 1 | ||
| --let $status_timeout = 30 | ||
| --source include/wait_for_status_var.inc | ||
| show status like 'Slave_received_heartbeats'; |
There was a problem hiding this comment.
It looks like it never fails here on whatever reason, but i suppose it's good to make it stable here anyway. However, then it also makes sense to address the same (although in this case hypothetical) problem as we have in the earlier part, that it might fail in wait_for_status_var wait if by the time it starts waiting there are already 2+ heartbeats.
Replace the two recorded reads of Slave_received_heartbeats with an assertion that the counter is nonzero.
The counter advances once per heartbeat period for as long as the connection is running. The test waited for it to reach 2 and then read it again in a separate query, so a heartbeat arriving between those two queries recorded an unexpected value.