Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 9 of 9 for simulate (0.39 sec)

  1. cmd/naughty-disk_test.go

    import (
    	"context"
    	"io"
    	"sync"
    	"time"
    
    	"github.com/minio/madmin-go/v3"
    )
    
    // naughtyDisk wraps a POSIX disk and returns programmed errors
    // specified by the developer. The purpose is to simulate errors
    // that are hard to simulate in practice like DiskNotFound.
    // Programmed errors are stored in errors field.
    type naughtyDisk struct {
    	// The real disk
    	disk StorageAPI
    	// Programmed errors: API call number => error to return
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Tue Apr 23 17:15:52 GMT 2024
    - 9.3K bytes
    - Viewed (0)
  2. cni/pkg/nodeagent/ztunnelserver_test.go

    	ctx, cancel := context.WithCancel(context.Background())
    	defer cancel()
    
    	pods := &fakePodCache{}
    
    	pod, f := podAndNetns()
    	f.Close()
    	pods.pods = map[string]WorkloadInfo{
    		string(pod.UID): {}, // simulate unknown netns
    	}
    
    	fixture := connectWithPods(ctx, pods)
    	ztunClient := fixture.ztunClient
    	// read initial pod add
    	keep, fds := readRequest(t, ztunClient)
    	assert.Equal(t, len(fds), 0)
    Go
    - Registered: Wed May 01 22:53:12 GMT 2024
    - Last Modified: Fri Apr 12 21:47:31 GMT 2024
    - 8.6K bytes
    - Viewed (0)
  3. okhttp-testing-support/src/main/kotlin/okhttp3/internal/concurrent/TaskFaker.kt

          val sleepUntil = nanoTime + durationNanos
          yieldUntil { nanoTime >= sleepUntil }
        }
      }
    
      /**
       * Artificially stall until manually resumed by the test thread with [runTasks]. Use this to
       * simulate races in tasks that doesn't have a deterministic sequence.
       */
      fun yield() {
        taskRunner.assertThreadDoesntHoldLock()
        taskRunner.lock.withLock {
          yieldUntil()
        }
      }
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Apr 29 00:33:04 GMT 2024
    - 12.6K bytes
    - Viewed (0)
  4. src/bytes/buffer_test.go

    	var bb Buffer
    	bb.Grow(16 << 20)
    	b.SetBytes(int64(bb.Available()))
    	b.ReportAllocs()
    	for i := 0; i < b.N; i++ {
    		bb.Reset()
    		b := bb.AvailableBuffer()
    		b = b[:cap(b)] // use max capacity to simulate a large append operation
    		bb.Write(b)    // should be nearly infinitely fast
    	}
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Fri Apr 26 13:31:36 GMT 2024
    - 18.6K bytes
    - Viewed (0)
  5. okhttp/src/test/java/okhttp3/internal/cache/DiskLruCacheTest.kt

        // incomplete.
        val creator = cache.edit("k1")!!
        creator.newSink(0).buffer().use {
          it.writeUtf8("Hello")
        }
    
        // Simulate a severe Filesystem failure on the first initialization.
        filesystem.setFaultyDelete(cacheDir / "k1.0.tmp", true)
        filesystem.setFaultyDelete(cacheDir, true)
        cache =
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Apr 15 14:55:09 GMT 2024
    - 75.8K bytes
    - Viewed (0)
  6. cmd/object-handlers_test.go

    	"github.com/minio/minio/internal/hash/sha256"
    	xhttp "github.com/minio/minio/internal/http"
    	ioutilx "github.com/minio/minio/internal/ioutil"
    )
    
    // Type to capture different modifications to API request to simulate failure cases.
    type Fault int
    
    const (
    	None Fault = iota
    	MissingContentLength
    	TooBigObject
    	TooBigDecodedLength
    	BadSignature
    	BadMD5
    	MissingUploadID
    )
    
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Sun Apr 28 17:53:50 GMT 2024
    - 160K bytes
    - Viewed (0)
  7. cni/pkg/nodeagent/fakes_test.go

    }
    
    // Fd returns the file descriptor
    func (f *fakeNs) Fd() uintptr {
    	return f.fd
    }
    
    func (f *fakeNs) Inode() uint64 {
    	return f.inode
    }
    
    // Close simulates closing the file descriptor and returns nil for no error
    func (f *fakeNs) Close() error {
    	f.closed.Store(true)
    	return nil
    }
    
    func fakeFs() fs.FS {
    	subFs, err := fs.Sub(fakeProc, "testdata")
    	if err != nil {
    Go
    - Registered: Wed May 01 22:53:12 GMT 2024
    - Last Modified: Fri Apr 12 21:47:31 GMT 2024
    - 3.9K bytes
    - Viewed (0)
  8. RELEASE.md

    *   `tf.lite`:
    
        *   `tf.quantization.quantize_and_dequantize_v2` has been introduced, which
            updates the gradient definition for quantization which is outside the
            range to be 0. To simulate the V1 the behavior of
            `tf.quantization.quantize_and_dequantize(...)` use
            `tf.grad_pass_through(tf.quantization.quantize_and_dequantize_v2)(...)`.
    
    *   Building TensorFlow:
    
    Plain Text
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Mon Apr 29 19:17:57 GMT 2024
    - 727.7K bytes
    - Viewed (8)
  9. okhttp/src/test/java/okhttp3/internal/http2/HttpOverHttp2Test.kt

          Thread.sleep(2000L)
        }
        if (connection.isHealthy(false)) {
          throw TimeoutException("connection didn't shutdown within timeout")
        }
      }
    
      /**
       * This simulates a race condition where we receive a healthy HTTP/2 connection and just prior to
       * writing our request, we get a GOAWAY frame from the server.
       */
      @ParameterizedTest
      @ArgumentsSource(ProtocolParamProvider::class)
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Thu Apr 11 22:09:35 GMT 2024
    - 75.3K bytes
    - Viewed (0)
Back to top