Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 11 for simulate (0.22 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. 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)
  3. 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)
  4. 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)
  5. 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)
  6. 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)
  7. 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)
  8. 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)
  9. 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)
  10. cmd/test-utils_test.go

    	os.RemoveAll(testServer.Root)
    	for _, ep := range testServer.Disks {
    		for _, disk := range ep.Endpoints {
    			os.RemoveAll(disk.Path)
    		}
    	}
    }
    
    // Truncate request to simulate unexpected EOF for a request signed using streaming signature v4.
    func truncateChunkByHalfSigv4(req *http.Request) (*http.Request, error) {
    	bufReader := bufio.NewReader(req.Body)
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Thu Apr 04 12:06:57 GMT 2024
    - 75.7K bytes
    - Viewed (0)
Back to top