Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for afterFunc (0.15 sec)

  1. src/net/http/transport_test.go

    	if d, ok := t.Deadline(); ok {
    		// When the test's deadline is about to expire, log the pending events for
    		// better debugging.
    		timeout := time.Until(d) * 19 / 20 // Allow 5% for cleanup.
    		timer := time.AfterFunc(timeout, func() {
    			panic(fmt.Sprintf("hang in %s. events are: %s", t.Name(), logbuf.String()))
    		})
    		defer timer.Stop()
    	}
    	<-gotres
    
    	got := logbuf.String()
    	want := `dial: blocking
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Jun 06 21:59:21 UTC 2024
    - 192.6K bytes
    - Viewed (0)
  2. src/reflect/all_test.go

    			// For short tests we can grow [sic] the timeout a bit without fear of taking too long
    			pause := 10 * time.Microsecond
    			if testing.Short() {
    				pause = 100 * time.Microsecond
    			}
    			time.AfterFunc(pause, helper)
    		}
    
    		// Run select.
    		i, recv, recvOK, panicErr := runSelect(cases, info)
    		if panicErr != nil && !canPanic {
    			t.Fatalf("%s\npanicked unexpectedly: %v", fmtSelect(info), panicErr)
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 218.8K bytes
    - Viewed (0)
Back to top