Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for setResponseDelay (0.11 sec)

  1. internal/dsync/dsync_test.go

    		t.Fatal("GetLock() should be successful")
    	}
    
    	// Add delay to lock server responses to ensure that lock does not timeout
    	for i := range lockServers {
    		lockServers[i].setResponseDelay(5 * testDrwMutexUnlockCallTimeout)
    		defer lockServers[i].setResponseDelay(0)
    	}
    
    	unlockReturned := make(chan struct{}, 1)
    	go func() {
    		ctx, cancel := context.WithTimeout(context.Background(), 500*time.Millisecond)
    		defer cancel()
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Wed Jun 19 14:35:19 UTC 2024
    - 11.1K bytes
    - Viewed (0)
  2. internal/dsync/dsync-server_test.go

    	responseDelay int64
    }
    
    func (l *lockServer) setRefreshReply(refreshed bool) {
    	l.mutex.Lock()
    	defer l.mutex.Unlock()
    	l.lockNotFound = !refreshed
    }
    
    func (l *lockServer) setResponseDelay(responseDelay time.Duration) {
    	atomic.StoreInt64(&l.responseDelay, int64(responseDelay))
    }
    
    func (l *lockServer) Lock(args *LockArgs) (reply bool, err error) {
    	if d := atomic.LoadInt64(&l.responseDelay); d != 0 {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Mon Jan 23 16:46:37 UTC 2023
    - 8.3K bytes
    - Viewed (0)
Back to top