1 parent 68caee0 commit b0a3baeCopy full SHA for b0a3bae
1 file changed
internal/sync/errgroup_test.go
@@ -48,6 +48,26 @@ func Test_ErrGroup_FirstError(t *testing.T) {
48
require.NoError(t, err)
49
}
50
51
+func Test_ErrGroup_GoAfterWait_Panics(t *testing.T) {
52
+ s := NewScheduler()
53
+ ctx := Background()
54
+
55
+ s.NewCoroutine(ctx, func(ctx Context) error {
56
+ gctx, g := WithErrGroup(ctx)
57
58
+ g.Go(func(ctx Context) error { return nil })
59
+ _ = g.Wait(gctx)
60
61
+ require.Panics(t, func() {
62
63
+ })
64
+ return nil
65
66
67
+ err := s.Execute()
68
+ require.NoError(t, err)
69
+}
70
71
func Test_ErrGroup_MultipleErrors_FirstWins(t *testing.T) {
72
s := NewScheduler()
73
ctx := Background()
0 commit comments