(t *testing.T)
| 16 | ) |
| 17 | |
| 18 | func TestRunUntilEndpointHit_Signal(t *testing.T) { |
| 19 | s := make(chan struct{}) |
| 20 | go func() { |
| 21 | testutil.Ok(t, RunUntilEndpointHit()) |
| 22 | s <- struct{}{} |
| 23 | close(s) |
| 24 | }() |
| 25 | |
| 26 | pid := os.Getpid() |
| 27 | testutil.Ok(t, runutil.Retry(200*time.Millisecond, context.Background().Done(), func() error { |
| 28 | testutil.Ok(t, syscall.Kill(pid, syscall.SIGHUP)) |
| 29 | select { |
| 30 | case <-s: |
| 31 | return nil |
| 32 | default: |
| 33 | return errors.New("execution is still stopped") |
| 34 | } |
| 35 | })) |
| 36 | } |
| 37 | |
| 38 | func TestRunUtilSignal(t *testing.T) { |
| 39 | s := make(chan struct{}) |
nothing calls this directly
no test coverage detected
searching dependent graphs…