Skip to content

Commit f82854d

Browse files
ashmckenziePatrick Bajao
and
Patrick Bajao
committed
Merge branch '602-fix-race-in-test' into 'main'
Use blocking reader to fix race in test Closes #602 See merge request https://gitlab.com/gitlab-org/gitlab-shell/-/merge_requests/700 Merged-by: Ash McKenzie <[email protected]> Approved-by: Ash McKenzie <[email protected]> Co-authored-by: Patrick Bajao <[email protected]>
2 parents 75f1846 + b427744 commit f82854d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

internal/command/twofactorverify/twofactorverify_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ func TestCanceledContext(t *testing.T) {
177177
cmd := &Command{
178178
Config: &config.Config{GitlabUrl: url},
179179
Args: &commandargs.Shell{GitlabKeyId: "wait_infinitely"},
180-
ReadWriter: &readwriter.ReadWriter{Out: output, In: &bytes.Buffer{}},
180+
ReadWriter: &readwriter.ReadWriter{Out: output, In: &blockingReader{}},
181181
}
182182

183183
ctx, cancel := context.WithCancel(context.Background())

0 commit comments

Comments
 (0)