Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 13 for restError (0.21 sec)

  1. internal/rest/client_test.go

    		want   bool
    	}{
    		{
    			name:   "url.Error",
    			err:    &url.Error{Op: "PUT", URL: "http://localhost/1234", Err: restError("remote server offline")},
    			target: &url.Error{},
    			want:   true,
    		},
    		{
    			name: "net.Error",
    			err:  &url.Error{Op: "PUT", URL: "http://localhost/1234", Err: restError("remote server offline")},
    			want: true,
    		},
    		{
    			name: "net.Error-unmatched",
    			err:  errors.New("something"),
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Tue Nov 16 17:28:29 GMT 2021
    - 1.9K bytes
    - Viewed (0)
  2. internal/rest/client.go

    	newAuthToken func(audience string) string
    
    	sync.RWMutex // mutex for lastErr
    	lastErr      error
    	lastErrTime  time.Time
    }
    
    type restError string
    
    func (e restError) Error() string {
    	return string(e)
    }
    
    func (e restError) Timeout() bool {
    	return true
    }
    
    // Given a string of the form "host", "host:port", or "[ipv6::address]:port",
    // return true if the string includes a port.
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 14K bytes
    - Viewed (0)
  3. guava-tests/test/com/google/common/util/concurrent/FutureCallbackTest.java

        assertThat(successCalls[0]).isEqualTo(1);
        assertThat(failureCalls[0]).isEqualTo(0);
      }
    
      public void testOnSuccessThrowsError() throws Exception {
        class TestError extends Error {}
        TestError error = new TestError();
        String result = "result";
        SettableFuture<String> future = SettableFuture.create();
        int[] successCalls = new int[1];
        int[] failureCalls = new int[1];
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Tue Nov 15 16:33:21 GMT 2022
    - 6.3K bytes
    - Viewed (0)
  4. android/guava-tests/test/com/google/common/util/concurrent/FutureCallbackTest.java

        assertThat(successCalls[0]).isEqualTo(1);
        assertThat(failureCalls[0]).isEqualTo(0);
      }
    
      public void testOnSuccessThrowsError() throws Exception {
        class TestError extends Error {}
        TestError error = new TestError();
        String result = "result";
        SettableFuture<String> future = SettableFuture.create();
        int[] successCalls = new int[1];
        int[] failureCalls = new int[1];
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Apr 06 12:56:11 GMT 2023
    - 6.3K bytes
    - Viewed (0)
  5. cmd/perf-tests.go

    				mu.Unlock()
    			}
    		}(i)
    	}
    	wg.Wait()
    
    	// We already saw write failures, no need to proceed into read's
    	if retError != "" {
    		return SpeedTestResult{
    			Uploads:     totalBytesWritten,
    			Downloads:   totalBytesRead,
    			UploadTimes: uploadTimes,
    			Error:       retError,
    		}, nil
    	}
    
    	downloadsCtx, downloadsCancel := context.WithTimeout(ctx, opts.duration)
    	defer downloadsCancel()
    
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Sun Jan 28 18:04:17 GMT 2024
    - 11.3K bytes
    - Viewed (0)
  6. src/bufio/scan_test.go

    	const text = "abcdefghijklmn\nopqrstuvwxyz\n\r"
    	lines := []string{
    		"abcdefghijklmn",
    		"opqrstuvwxyz",
    		"",
    	}
    	testNoNewline(text, lines, t)
    }
    
    var testError = errors.New("testError")
    
    // Test the correct error is returned when the split function errors out.
    func TestSplitError(t *testing.T) {
    	// Create a split function that delivers a little data, then a predictable error.
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Fri Sep 22 16:22:42 GMT 2023
    - 14.3K bytes
    - Viewed (0)
  7. src/test/java/org/codelibs/core/log/LoggerTest.java

         * @throws Exception
         */
        @Test
        public void testWarn() throws Exception {
            logger.warn("warn");
        }
    
        /**
         * @throws Exception
         */
        @Test
        public void testError() throws Exception {
            logger.error("error");
        }
    
        /**
         * @throws Exception
         */
        @Test
        public void testFatal() throws Exception {
            logger.fatal("fatal");
        }
    
    Java
    - Registered: Fri May 03 20:58:11 GMT 2024
    - Last Modified: Thu Mar 07 01:59:08 GMT 2024
    - 3.8K bytes
    - Viewed (0)
  8. src/archive/tar/tar_test.go

    package tar
    
    import (
    	"bytes"
    	"errors"
    	"fmt"
    	"internal/testenv"
    	"io"
    	"io/fs"
    	"math"
    	"os"
    	"path"
    	"path/filepath"
    	"reflect"
    	"strings"
    	"testing"
    	"time"
    )
    
    type testError struct{ error }
    
    type fileOps []any // []T where T is (string | int64)
    
    // testFile is an io.ReadWriteSeeker where the IO operations performed
    // on it must match the list of operations in ops.
    type testFile struct {
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Fri Mar 15 16:01:50 GMT 2024
    - 24K bytes
    - Viewed (0)
  9. src/test/java/org/codelibs/fess/helper/CrawlingConfigHelperTest.java

                        failureUrl.setId("E" + i);
                        failureUrl.setUrl("http://test.com/" + i + ".html");
                        failureUrl.setErrorCount(i);
                        failureUrl.setErrorName("TestError" + i);
                        list.add(failureUrl);
                    }
                    return list;
                }
            }, FailureUrlBhv.class.getCanonicalName());
    
    Java
    - Registered: Mon Apr 29 08:04:11 GMT 2024
    - Last Modified: Thu Feb 22 01:37:57 GMT 2024
    - 23.2K bytes
    - Viewed (0)
  10. src/archive/tar/writer_test.go

    						t.Fatalf("test %d, Write() = (%d, %v), want (%d, %v)", i, got, err, tf.wantCnt, tf.wantErr)
    					}
    				case testReadFrom:
    					f := &testFile{ops: tf.ops}
    					got, err := tw.readFrom(f)
    					if _, ok := err.(testError); ok {
    						t.Errorf("test %d, ReadFrom(): %v", i, err)
    					} else if got != tf.wantCnt || !equalError(err, tf.wantErr) {
    						t.Errorf("test %d, ReadFrom() = (%d, %v), want (%d, %v)", i, got, err, tf.wantCnt, tf.wantErr)
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Tue Feb 27 16:39:23 GMT 2024
    - 38.7K bytes
    - Viewed (0)
Back to top