[Functional] Fix expected number of the enqueue_state_change calls
In the HA router's keepalived state change monitor tests, it was
expected that enqueue_state_change method will be called 3 or 4 times.
But after some changes in the keepalived_state_change monitor which were
done some time ago, it may be now that it will be called just 2 or 3
times:
- 2 when initial status will be "primary" and it will be just
transition to "backup",
- 3 when initial status will be "backup", then it will transition to
"primary" and finally to "backup" again.
To reflect those 2 possibilities, test was changed that it will expect
2 or 3 calls and will check only that last 2 will be always transition
to "primary" and then to "backup".
Additionally this patch adds some extra logging in that test so it will
be easier to check what was going on in that test.
Reviewed: https:/ /review. opendev. org/c/openstack /neutron/ +/822709 /opendev. org/openstack/ neutron/ commit/ bed8c6d58028b7d 5a426dbd474dccb e34048fd63
Committed: https:/
Submitter: "Zuul (22348)"
Branch: stable/ussuri
commit bed8c6d58028b7d 5a426dbd474dccb e34048fd63
Author: Slawek Kaplonski <email address hidden>
Date: Thu Dec 16 22:25:27 2021 +0100
[Functional] Fix expected number of the enqueue_ state_change calls
In the HA router's keepalived state change monitor tests, it was state_change method will be called 3 or 4 times. state_change monitor which were
expected that enqueue_
But after some changes in the keepalived_
done some time ago, it may be now that it will be called just 2 or 3
times:
- 2 when initial status will be "primary" and it will be just
transition to "backup",
- 3 when initial status will be "backup", then it will transition to
"primary" and finally to "backup" again.
To reflect those 2 possibilities, test was changed that it will expect
2 or 3 calls and will check only that last 2 will be always transition
to "primary" and then to "backup".
Additionally this patch adds some extra logging in that test so it will
be easier to check what was going on in that test.
Conflicts:
neutron/ tests/functiona l/agent/ l3/test_ ha_router. py
Closes-Bug: #1954751 c35c43801969e3f 0c16dead5bb 56c880da3f82257 977a06a571) 71f2b8d6577a39b b7be6376e6)
Change-Id: Ib5de7e65839f52
(cherry picked from commit c6a6c5ae127a978
(cherry picked from commit 533ca2c99c454c1