From 4e4d2bc7457508d7864224c9e9311d944ae500c2 Mon Sep 17 00:00:00 2001 From: Yuri Shkuro Date: Thu, 19 Oct 2023 12:51:18 -0400 Subject: [PATCH] test[es]: Force batch size 1 in test (#4865) ## Which problem is this PR solving? - Resolves #4743 The test is still failing: https://github.com/jaegertracing/jaeger/actions/runs/6577136964/job/17868105418#step:7:461 From the logs we can see that the new client is started to be used (HEAD requests with new password), but then a bulk request with password1 comes in and breaks the test. ## Description of the changes - Set BulkSize to -1, which according to the driver docs disables bulk processing. ## How was this change tested? - Local test is successful, but the issue is difficult to reproduce --------- Signed-off-by: Yuri Shkuro --- plugin/storage/es/factory_test.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugin/storage/es/factory_test.go b/plugin/storage/es/factory_test.go index 7d03c3bc886..5b147ecb20e 100644 --- a/plugin/storage/es/factory_test.go +++ b/plugin/storage/es/factory_test.go @@ -303,12 +303,14 @@ func testPasswordFromFile(t *testing.T, f *Factory, getClient func() es.Client, Servers: []string{server.URL}, LogLevel: "debug", PasswordFilePath: pwdFile, + BulkSize: -1, // disable bulk; we want immediate flush } f.archiveConfig = &escfg.Configuration{ Enabled: true, Servers: []string{server.URL}, LogLevel: "debug", PasswordFilePath: pwdFile, + BulkSize: -1, // disable bulk; we want immediate flush } require.NoError(t, f.Initialize(metrics.NullFactory, zaptest.NewLogger(t))) defer f.Close()