Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 9 of 9 for testClone (0.18 sec)

  1. hack/lib/init.sh

    # ln -s $T/dir $T/linkdir
    # function testone() {
    #   X=$(readlink -f $1 2>&1)
    #   Y=$(kube::readlinkdashf $1 2>&1)
    #   if [ "$X" != "$Y" ]; then
    #     echo readlinkdashf $1: expected "$X", got "$Y"
    #   fi
    # }
    # testone /
    # testone /tmp
    # testone $T
    # testone $T/file
    # testone $T/dir
    # testone $T/linkfile
    # testone $T/linkdir
    # testone $T/nonexistant
    # testone $T/linkdir/file
    # testone $T/linkdir/dir
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Jun 06 16:18:38 UTC 2024
    - 6.2K bytes
    - Viewed (0)
  2. src/archive/tar/writer_test.go

    		}
    		testReadFrom struct { // ReadFrom(testFile{ops}) == (wantCnt, wantErr)
    			ops     fileOps
    			wantCnt int64
    			wantErr error
    		}
    		testClose struct { // Close() == wantErr
    			wantErr error
    		}
    		testFnc any // testHeader | testWrite | testReadFrom | testClose
    	)
    
    	vectors := []struct {
    		file  string // Optional filename of expected output
    		tests []testFnc
    	}{{
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 38.7K bytes
    - Viewed (0)
  3. src/time/time_test.go

    		}
    		return true
    	}
    
    	// manual test cases
    	for _, tt := range truncateRoundTests {
    		testOne(tt.t.Unix(), int64(tt.t.Nanosecond()), int64(tt.d))
    	}
    
    	// exhaustive near 0
    	for i := 0; i < 100; i++ {
    		for j := 1; j < 100; j++ {
    			testOne(unixToZero, int64(i), int64(j))
    			testOne(unixToZero, -int64(i), int64(j))
    			if t.Failed() {
    				return
    			}
    		}
    	}
    
    	if t.Failed() {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 03:13:47 UTC 2024
    - 56.5K bytes
    - Viewed (0)
  4. src/net/http/clientserver_test.go

    	const msg = "hello"
    
    	testDone := make(chan struct{})
    	defer close(testDone)
    
    	var errorLog lockedBytesBuffer
    	gotHeaders := make(chan bool, 1)
    	cst := newClientServerTest(t, mode, HandlerFunc(func(w ResponseWriter, r *Request) {
    		io.WriteString(w, msg)
    		w.(Flusher).Flush()
    
    		select {
    		case <-gotHeaders:
    		case <-testDone:
    		}
    		panic(panicValue)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 46.6K bytes
    - Viewed (0)
  5. src/net/http/client_test.go

    func testClientTimeoutCancel(t *testing.T, mode testMode) {
    	testDone := make(chan struct{})
    	ctx, cancel := context.WithCancel(context.Background())
    
    	cst := newClientServerTest(t, mode, HandlerFunc(func(w ResponseWriter, r *Request) {
    		w.(Flusher).Flush()
    		<-testDone
    	}))
    	defer close(testDone)
    
    	cst.c.Timeout = 1 * time.Hour
    	req, _ := NewRequest("GET", cst.ts.URL, nil)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 21:30:50 UTC 2024
    - 63.8K bytes
    - Viewed (0)
  6. src/net/http/transport_test.go

    	}
    	ln := newLocalListener(t)
    	defer ln.Close()
    
    	var wg sync.WaitGroup
    	SetPendingDialHooks(func() { wg.Add(1) }, wg.Done)
    	defer SetPendingDialHooks(nil, nil)
    
    	testDone := make(chan struct{})
    	defer close(testDone)
    	go func() {
    		tln := tls.NewListener(ln, &tls.Config{
    			NextProtos:   []string{"foo"},
    			Certificates: []tls.Certificate{cert},
    		})
    		sc, err := tln.Accept()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Jun 06 21:59:21 UTC 2024
    - 192.6K bytes
    - Viewed (0)
  7. src/crypto/tls/handshake_server_test.go

    	s.Close()
    	var opErr *net.OpError
    	if !errors.As(err, &opErr) || opErr.Err != error(alertUnknownCA) {
    		t.Errorf("Got error: %s; expected: %s", err, error(alertUnknownCA))
    	}
    }
    
    func TestClose(t *testing.T) {
    	c, s := localPipe(t)
    	go c.Close()
    
    	err := Server(s, testConfig).Handshake()
    	s.Close()
    	if err != io.EOF {
    		t.Errorf("Got error: %s; expected: %s", err, io.EOF)
    	}
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jun 03 14:56:25 UTC 2024
    - 64.7K bytes
    - Viewed (0)
  8. src/net/http/serve_test.go

    		6: {"/testThree?foo", "CONNECT", "foo", true},
    		7: {"/testThree/?foo", "CONNECT", "foo:bar", true},
    
    		// canonicalization or not
    		8: {"/testOne/foo/..?foo", "GET", "foo", true},
    		9: {"/testOne/foo/..?foo", "CONNECT", "404 page not found\n", false},
    	}
    
    	for i, tt := range tests {
    		req, _ := NewRequest(tt.method, ts.URL+tt.path, nil)
    		res, err := ts.Client().Do(req)
    		if err != nil {
    			continue
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jun 07 17:57:01 UTC 2024
    - 202K bytes
    - Viewed (0)
  9. pkg/scheduler/framework/runtime/framework_test.go

    			}
    			got := f.ListPlugins()
    			if diff := cmp.Diff(tt.want, got); diff != "" {
    				t.Errorf("unexpected plugins (-want,+got):\n%s", diff)
    			}
    		})
    	}
    }
    
    func TestClose(t *testing.T) {
    	tests := []struct {
    		name    string
    		plugins *config.Plugins
    		wantErr error
    	}{
    		{
    			name: "close doesn't return error",
    			plugins: &config.Plugins{
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri May 17 09:07:27 UTC 2024
    - 103K bytes
    - Viewed (0)
Back to top