-
Notifications
You must be signed in to change notification settings - Fork 592
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(orc8r): Stabilize cloud tests #14083
fix(orc8r): Stabilize cloud tests #14083
Conversation
Thanks for opening a PR! 💯
Howto
More infoPlease take a moment to read through the Magma project's
If this is your first Magma PR, also consider reading
|
00f5b97
to
b5ad548
Compare
orc8r/cloud/go/services/state/indexer/reindex/reindexer_singleton_test.go
Outdated
Show resolved
Hide resolved
orc8r/cloud/go/services/state/indexer/reindex/reindexer_singleton_test.go
Outdated
Show resolved
Hide resolved
orc8r/cloud/go/services/state/indexer/reindex/reindexer_singleton_test.go
Outdated
Show resolved
Hide resolved
a3362a3
to
dd6e9d9
Compare
dd6e9d9
to
f7c6600
Compare
3103fc3
to
e8a27b1
Compare
35757c2
to
4443db0
Compare
89bfb19
to
3be2208
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This didn't exactly make the test easier to understand. ;) I think it's looking good but there's a few changes I'm not sure about. Maybe let's go over it tomorrow in person.
orc8r/cloud/go/services/state/indexer/reindex/reindexer_singleton_test.go
Outdated
Show resolved
Hide resolved
orc8r/cloud/go/services/state/indexer/reindex/reindexer_singleton_test.go
Show resolved
Hide resolved
Signed-off-by: Moritz Huebner <moritz.huebner@tngtech.com>
Signed-off-by: Moritz Huebner <moritz.huebner@tngtech.com>
Keeps track of connection failures when running tests. Signed-off-by: Moritz Huebner <moritz.huebner@tngtech.com>
Signed-off-by: Moritz Huebner <moritz.huebner@tngtech.com>
Signed-off-by: Moritz Huebner <moritz.huebner@tngtech.com>
Signed-off-by: Moritz Huebner <moritz.huebner@tngtech.com>
Signed-off-by: Moritz Huebner <moritz.huebner@tngtech.com>
Signed-off-by: Moritz Huebner <moritz.huebner@tngtech.com>
Signed-off-by: Moritz Huebner <moritz.huebner@tngtech.com>
- Renamed `recvChSafe` to `recvChAndRetryFailures`. - Added global check on `reindexConnectionFailsTotal` so it aborts if the connection keeps failing. Signed-off-by: Moritz Huebner <moritz.huebner@tngtech.com>
77cfbcc
to
55750d9
Compare
* fix(orc8r): Stabilize reindexer singleton tests Signed-off-by: Moritz Huebner <moritz.huebner@tngtech.com> * fix(orc8r): Reverted all temporary changes Signed-off-by: Moritz Huebner <moritz.huebner@tngtech.com> * fix(orc8r): Added Connection failure test hook Keeps track of connection failures when running tests. Signed-off-by: Moritz Huebner <moritz.huebner@tngtech.com> * fix(orc8r): Added safe checks for reindexing failures Signed-off-by: Moritz Huebner <moritz.huebner@tngtech.com> * fix(orc8r): Some refactoring to existing changes Signed-off-by: Moritz Huebner <moritz.huebner@tngtech.com> * fix(orc8r): Simplified some changes Signed-off-by: Moritz Huebner <moritz.huebner@tngtech.com> * fix(orc8r): Stabilized TestRunBrokenIndexer Signed-off-by: Moritz Huebner <moritz.huebner@tngtech.com> * fix(orc8r): Changed += 1 to ++ Signed-off-by: Moritz Huebner <moritz.huebner@tngtech.com> * fix(orc8r): Improved `TestRunBrokenIndexer` stability Signed-off-by: Moritz Huebner <moritz.huebner@tngtech.com> * fix(orc8r): Some changes for the review - Renamed `recvChSafe` to `recvChAndRetryFailures`. - Added global check on `reindexConnectionFailsTotal` so it aborts if the connection keeps failing. Signed-off-by: Moritz Huebner <moritz.huebner@tngtech.com>
Closes #13998
Signed-off-by: Moritz Huebner moritz.huebner@tngtech.com
Summary
Upon inspecting the recent cloud-workflow failures, we found the following flaky tests:
TestSqlConfiguratorStorage_LoadEntities
: 2 failuresTestGetSubscriberState
: 2 failuresTestSingletonRunSuccess
: 6 failuresTestSingletonRunFail
: 4 failuresTestSyncSubscribers
: 1 failureTestRunBrokenIndexer
: 1 failuresThis PR focuses on
TestSingletonRunSuccess
,TestSingletonRunFail
, andTestRunBrokenIndexer
.These changes focus on test isolation:
indexer.DeregisterAllForTest(t)
at the end of the tests. This is not strictly necessary to make the tests green, but it can cause issues with dangling indexers if the order of the tests is ever reversed.TestSingletonRunFail
:TestSingletonRunSuccess
:TestHookReindexDone
is called even if there is an error during reindexing. Unexpected errors can be triggered in the remote indexer getIndexerClient.TestHookReindexFailure
, that we use to keep track of reindexing job errors.ch
usingrecvChSafe
. This function keeps track of failures and will pull the requisite number of elements from the channel.TestRunBrokenIndexer
:TestSingletonRunFail
.recvCh
call as this appears to be unnecessary now,Test Plan
TestSingletonRunSuccess
:TestSingletonRunFail
TestRunBrokenIndexer
:recvCh
calls in the function.Additional Information