Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for TEST_TIMEOUT_HANG (0.08 sec)

  1. src/cmd/go/testdata/script/test_timeout_stdin.txt

    module example
    
    go 1.20
    -- main_test.go --
    package main
    
    import (
    	"fmt"
    	"io"
    	"os"
    	"os/exec"
    	"testing"
    	"time"
    )
    
    func TestMain(m *testing.M) {
    	if os.Getenv("TEST_TIMEOUT_HANG") == "1" {
    		io.Copy(io.Discard, os.Stdin)
    		if _, err := os.Stderr.WriteString("stdin closed\n"); err != nil {
    			os.Exit(1)
    		}
    
    		ticker := time.NewTicker(100 * time.Millisecond)
    		for t := range ticker.C {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Feb 02 20:23:27 UTC 2023
    - 2.2K bytes
    - Viewed (0)
Back to top