- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 18 for simulate (0.82 sec)
-
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) -
cmd/xl-storage-free-version_test.go
"00000000-0000-0000-0000-0000000000f1", "00000000-0000-0000-0000-0000000000f2", } // Simulate overwrite of null version newtierfi := tierfi newtierfi.SetTierFreeVersionID(fvIDs[0]) fatalErr(xl.AddFreeVersion(newtierfi)) report() fatalErr(xl.AddVersion(newtierfi)) report() // Simulate removal of null version newtierfi.TransitionTier = "" newtierfi.TransitionedObjName = ""
Go - Registered: Sun Apr 28 19:28:10 GMT 2024 - Last Modified: Sat Mar 02 05:11:03 GMT 2024 - 7.8K bytes - Viewed (0) -
cmd/admin-handlers_test.go
// single node setup, this degenerates to a simple function // call under the hood. globalMinioAddr = "127.0.0.1:9000" var wg sync.WaitGroup // Setting up a go routine to simulate ServerRouter's // handleServiceSignals for stop and restart commands. if cmd == restartCmd { wg.Add(1) go func() { defer wg.Done() testServiceSignalReceiver(cmd, t) }() }
Go - Registered: Sun Apr 28 19:28:10 GMT 2024 - Last Modified: Thu Feb 22 06:26:06 GMT 2024 - 13.8K bytes - Viewed (0) -
internal/deadlineconn/deadlineconn_test.go
return } received := string(b) if received != "message one\n" { t.Errorf(`server: expected: "message one\n", got: %v`, received) return } // Wait for more than read timeout to simulate processing. time.Sleep(3 * time.Second) _, terr = deadlineconn.Read(b) if terr != nil { t.Errorf("failed to read from client. %v", terr) return } received = string(b)
Go - Registered: Sun Apr 28 19:28:10 GMT 2024 - Last Modified: Sat Nov 05 18:09:21 GMT 2022 - 3K bytes - Viewed (0) -
cmd/xl-storage-format-utils_test.go
fi.ModTime = basefi.ModTime.Add(time.Duration(i) * time.Second) if err := xl.AddVersion(fi); err != nil { t.Fatalf("%d: Failed to add version %v", i+1, err) } if i > 3 { // Simulate transition of a version transfi := fi transfi.TransitionStatus = lifecycle.TransitionComplete transfi.TransitionTier = "MINIO-TIER" transfi.TransitionedObjName = mustGetUUID() xl.DeleteVersion(transfi)
Go - Registered: Sun Apr 28 19:28:10 GMT 2024 - Last Modified: Sat Sep 02 14:49:24 GMT 2023 - 6K bytes - Viewed (0) -
cmd/metrics-v2_test.go
}, { val: 0.79, label: labels[2], }, } ticker := time.NewTicker(1 * time.Millisecond) defer ticker.Stop() for _, obs := range observations { // Send observations once every 1ms, to simulate delay between // observations. This is to test the channel based // synchronization used internally. select { case <-ticker.C: ttfbHist.With(prometheus.Labels{"api": obs.label}).Observe(obs.val) } }
Go - Registered: Sun Apr 28 19:28:10 GMT 2024 - Last Modified: Mon Mar 04 18:05:56 GMT 2024 - 2.3K bytes - Viewed (0) -
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) -
cmd/erasure-healing_test.go
fileInfoPreHeal, err := disk.ReadVersion(context.Background(), "", bucket, object, "", ReadOptions{ReadData: false, Healing: true}) if err != nil { t.Fatal(err) } // Remove the object - to simulate the case where the disk was down when the object // was created. err = removeAll(pathJoin(disk.String(), bucket, object)) if err != nil { t.Fatal(err) } // Checking abandoned parts should do nothing
Go - Registered: Sun Apr 28 19:28:10 GMT 2024 - Last Modified: Wed Mar 27 15:10:40 GMT 2024 - 47.6K bytes - Viewed (0) -
internal/dsync/dsync_test.go
} // Test canceling context while quorum servers report lock not found func TestFailedRefreshLock(t *testing.T) { if testing.Short() { t.Skip("skipping test in short mode.") } // Simulate Refresh response to return no locking found for i := range lockServers[:3] { lockServers[i].setRefreshReply(false) defer lockServers[i].setRefreshReply(true) } dm := NewDRWMutex(ds, "aap")
Go - Registered: Sun Apr 28 19:28:10 GMT 2024 - Last Modified: Sat Dec 24 03:49:07 GMT 2022 - 11K bytes - Viewed (0) -
cni/pkg/nodeagent/informers_test.go
mt.Assert(EventTotals.Name(), map[string]string{"type": "update"}, monitortest.AtLeast(4)) waitForMockCalls() assertPodNotAnnotated(t, client, pod) // patch a test label to emulate a non-annotation POD update event _, err = client.Kube().CoreV1().Pods(pod.Namespace).Patch(ctx, pod.Name, types.MergePatchType, []byte(`{"metadata":{"labels":{"test":"update"}}}`), metav1.PatchOptions{})
Go - Registered: Wed May 01 22:53:12 GMT 2024 - Last Modified: Thu Feb 08 01:03:24 GMT 2024 - 15.8K bytes - Viewed (0)