Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 1,371 for Allocate (0.12 sec)

  1. releasenotes/notes/auto-allocate-dns.yaml

    John Howard <******@****.***> 1607394502 -0800
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue Dec 08 02:28:22 UTC 2020
    - 325 bytes
    - Viewed (0)
  2. subprojects/core/src/test/groovy/org/gradle/util/ports/ReservedPortRangeTest.groovy

                range.allocate()
            }
    
            then:
            10 * portDetector.isAvailable(_) >> { true }
    
            and:
            range.allocate() == -1
        }
    
        def "ports are allocated in sequence" () {
            when:
            def port1 = range.allocate()
            def port2 = range.allocate()
            def port3 = range.allocate()
    
            then:
            port2 == next(port1)
            port3 == next(port2)
    
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Aug 06 13:37:30 UTC 2015
    - 3.1K bytes
    - Viewed (0)
  3. pkg/registry/core/service/allocator/storage/storage_test.go

    	// Allocate an item in the storage
    	if _, err := storage.Allocate(2); err != nil {
    		t.Fatal(err)
    	}
    
    	// Release the item in the local bitmap
    	// emulating it's out of sync with the storage
    	err := backing.Release(2)
    	if err != nil {
    		t.Fatal(err)
    	}
    
    	// It should fail trying to allocate it deespite it's free
    	// in the local bitmap because it's not in the storage
    	ok, err := storage.Allocate(2)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Sep 01 20:54:26 UTC 2021
    - 4.8K bytes
    - Viewed (0)
  4. pkg/registry/core/service/portallocator/storage/storage_test.go

    		t.Fatalf("unexpected error: %v", err)
    	}
    
    	// Allocate a port inside the valid port range
    	if err := storage.Allocate(30100); err != nil {
    		t.Fatal(err)
    	}
    
    	// Try to allocate the same port in the local bitmap
    	// The local bitmap stores the offset of the port
    	// offset = port - base (30100 - 30000 = 100)
    	ok, err := backing.Allocate(100)
    	if err != nil {
    		t.Fatal(err)
    	}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 08 07:15:02 UTC 2024
    - 8.1K bytes
    - Viewed (0)
  5. pkg/registry/core/service/portallocator/operation.go

    		return nil
    	}
    
    	return errors
    }
    
    // Allocates a port, and record it for future rollback
    func (op *PortAllocationOperation) Allocate(port int) error {
    	if op.dryRun {
    		if op.pa.Has(port) {
    			return ErrAllocated
    		}
    		for _, a := range op.allocated {
    			if port == a {
    				return ErrAllocated
    			}
    		}
    		op.allocated = append(op.allocated, port)
    		return nil
    	}
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jul 26 17:14:05 UTC 2022
    - 4.2K bytes
    - Viewed (0)
  6. pkg/registry/core/service/allocator/bitmap_test.go

    	dynamicOffset := 16
    	// just to double check off by one errors
    	allocated := 0
    	m := NewAllocationMapWithOffset(max, "test", dynamicOffset)
    	// Allocate all possible values except the reserved
    	for i := dynamicOffset; i < max; i++ {
    		if ok, _ := m.Allocate(i); !ok {
    			t.Errorf("error allocate i %v", i)
    		} else {
    			allocated++
    		}
    	}
    	// Allocate all the values of the reserved block except one
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue May 10 08:56:31 UTC 2022
    - 13.3K bytes
    - Viewed (0)
  7. pkg/registry/core/service/ipallocator/storage/storage_test.go

    		if !storage.Has(netutils.ParseIPSloppy(ip)) {
    			t.Errorf("IP %s expected to be allocated", ip)
    		}
    	}
    
    	// allocate all addresses on the static block
    	for i := 0; i < dynamicOffset; i++ {
    		ip := fmt.Sprintf("192.168.1.%d", i+1)
    		if err := storage.Allocate(netutils.ParseIPSloppy(ip)); err != nil {
    			t.Errorf("Unexpected error trying to allocate IP %s: %v", ip, err)
    		}
    	}
    	if _, err := storage.AllocateNext(); err == nil {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Aug 24 09:23:05 UTC 2023
    - 5.9K bytes
    - Viewed (0)
  8. pkg/registry/core/service/portallocator/allocator_test.go

    	if err := r.Release(released); err != nil {
    		t.Fatal(err)
    	}
    
    	err = r.Allocate(1)
    	if _, ok := err.(*ErrNotInRange); !ok {
    		t.Fatal(err)
    	}
    
    	if err := r.Allocate(10001); err != ErrAllocated {
    		t.Fatal(err)
    	}
    
    	err = r.Allocate(20000)
    	if _, ok := err.(*ErrNotInRange); !ok {
    		t.Fatal(err)
    	}
    
    	err = r.Allocate(10201)
    	if _, ok := err.(*ErrNotInRange); !ok {
    		t.Fatal(err)
    	}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 08 07:15:02 UTC 2024
    - 14K bytes
    - Viewed (0)
  9. staging/src/k8s.io/apimachinery/pkg/runtime/allocator_test.go

    	target := &Allocator{}
    
    	for i := 0; i < iterations; i++ {
    		bytesToAllocate := rand.Intn(maxBytes)
    		buff := target.Allocate(uint64(bytesToAllocate))
    		if cap(buff) < bytesToAllocate {
    			t.Fatalf("expected the buffer to allocate: %v bytes whereas it allocated: %v bytes", bytesToAllocate, cap(buff))
    		}
    		if len(buff) != bytesToAllocate {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Feb 23 13:38:29 UTC 2022
    - 2.4K bytes
    - Viewed (0)
  10. pkg/registry/core/service/portallocator/operation_test.go

    	if err != nil {
    		t.Errorf("expected no error but got: %v", err)
    	}
    
    	// Try to allocate the returned port using the same operation
    	if e, a := ErrAllocated, op.Allocate(port); e != a {
    		t.Errorf("expected %v but got: %v", e, a)
    	}
    
    	// AllocateNext with a previously used dry run operation
    	op = StartOperation(r, true)
    	_ = op.Allocate(12345)
    	port, err = op.AllocateNext()
    	if port == 0 {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sun Aug 15 23:44:12 UTC 2021
    - 3.1K bytes
    - Viewed (0)
Back to top