Skip to content

Commit ef177e5

Browse files
committed
Deflake index migration tests
/i/index/refresh uses the elasticsearch.url to refresh both indices (default and additional.) I saw proxy failures for /<additional-index-name>/_refresh calls in the logs. This commit fixes these by allowing to refresh both indices with one URL as failing refreshes are one possible source of flakiness.
1 parent 15b8578 commit ef177e5

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

services/brig/test/integration/API/Search.hs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -645,6 +645,9 @@ testMigrationToNewIndex opts brig migrateIndexCommand = do
645645
& Opt.elasticsearchLens . Opt.urlLens .~ newESUrl
646646
optsWithIndex "both" =
647647
optsWithIndex "old"
648+
-- Unfortunately, /i/index/refresh uses this URL to refresh both indices!
649+
-- Thus, we need to refer to the proxy that hands requests to both through.
650+
& Opt.elasticsearchLens . Opt.urlLens .~ bothIndexUrl
648651
& Opt.elasticsearchLens . Opt.additionalWriteIndexLens ?~ newESIndex
649652
& Opt.elasticsearchLens . Opt.additionalWriteIndexUrlLens ?~ newESUrl
650653
-- 'additionalCaCertLens' needs to be added in order for brig to be able to reach both indices.

0 commit comments

Comments
 (0)