Fix another test race

Signed-off-by: Alex Greenbank <alex.greenbank@grafana.com>
This commit is contained in:
Alex Greenbank 2024-03-19 19:03:22 +00:00
parent b884b15f39
commit ca20eb9f32

View file

@ -1315,6 +1315,8 @@ func (c *TestWriteClient) GetProtoVersions(_ context.Context) (string, error) {
}
func (c *TestWriteClient) GetLastRWHeader() string {
c.mtx.Lock()
defer c.mtx.Unlock()
c.currstep++
if len(c.steps) > 0 {
return c.steps[c.currstep].lastRWHeader