From eba27e7721cc29a58c86d7dd76772e90eda259b1 Mon Sep 17 00:00:00 2001 From: David Dworken Date: Sun, 27 Aug 2023 16:12:54 -0700 Subject: [PATCH] Fix race condition in tests introduced by a79d4010581c5643a742f605c478f4a9cf9610b1 The race condition stems from the fact that queries are now async, so there is a chance this test hits ENTER before the new search queries have come in. --- client/client_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/client_test.go b/client/client_test.go index ad47e1a..79c0f8f 100644 --- a/client/client_test.go +++ b/client/client_test.go @@ -1825,7 +1825,7 @@ func TestTui(t *testing.T) { // Check the output when there is a selected result out = captureTerminalOutput(t, tester, []string{ "hishtory SPACE tquery ENTER", - "ls ENTER", + "ls", "ENTER", }) out = strings.Split(strings.TrimSpace(strings.Split(out, "hishtory tquery")[1]), "\n")[0] expected := `ls ~/`