Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for gotNumRequest (0.14 sec)

  1. pkg/wasm/httpfetcher_test.go

    		},
    	}
    
    	for _, c := range cases {
    		t.Run(c.name, func(t *testing.T) {
    			gotNumRequest := 0
    			wantWasmModule := "wasm\n"
    			ts = httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
    				c.handler(w, r, gotNumRequest)
    				gotNumRequest++
    			}))
    			defer ts.Close()
    			fetcher := NewHTTPFetcher(DefaultHTTPRequestTimeout, DefaultHTTPRequestMaxRetries)
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed May 24 15:56:41 UTC 2023
    - 7.5K bytes
    - Viewed (0)
  2. pkg/wasm/cache_test.go

    	defer close(cache.stopChan)
    
    	gotNumRequest := 0
    	binary1 := append(wasmHeader, 1)
    	binary2 := append(wasmHeader, 2)
    
    	// Create a test server which returns 0 for the first two calls, and returns 1 for the following calls.
    	ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
    		if gotNumRequest <= 1 {
    			w.Write(binary1)
    		} else {
    			w.Write(binary2)
    		}
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed Apr 17 20:06:41 UTC 2024
    - 33.9K bytes
    - Viewed (0)
Back to top