Search Options

Results per page
Sort
Preferred Languages
Advance

Results 111 - 120 of 175 for newTimer (0.82 sec)

  1. pkg/controller/ttlafterfinished/ttlafterfinished_controller_test.go

    			expectedTimeLeft: pointer.Duration(10 * time.Second),
    			expectedExpireAt: now.Add(10 * time.Second),
    		},
    		{
    			name:             "Job completed 10s ago, 15s TTL",
    			completionTime:   metav1.NewTime(now.Add(-10 * time.Second)),
    			ttl:              pointer.Int32(15),
    			since:            &now.Time,
    			expectedTimeLeft: pointer.Duration(5 * time.Second),
    			expectedExpireAt: now.Add(5 * time.Second),
    		},
    		{
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sun Jun 18 18:46:26 UTC 2023
    - 5.3K bytes
    - Viewed (0)
  2. plugin/pkg/admission/storage/storageclass/setdefault/admission_test.go

    	}
    	classWithCreateTime1 := &storagev1.StorageClass{
    		TypeMeta: metav1.TypeMeta{
    			Kind: "StorageClass",
    		},
    		ObjectMeta: metav1.ObjectMeta{
    			Name:              "default1",
    			CreationTimestamp: metav1.NewTime(time.Date(2022, time.Month(1), 1, 0, 0, 0, 1, time.UTC)),
    			Annotations: map[string]string{
    				storageutil.IsDefaultStorageClassAnnotation: "true",
    			},
    		},
    	}
    	classWithCreateTime2 := &storagev1.StorageClass{
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Oct 19 04:00:48 UTC 2022
    - 7.6K bytes
    - Viewed (0)
  3. pkg/kubelet/nodestatus/setters_test.go

    			LastTransitionTime: metav1.NewTime(transition),
    			LastHeartbeatTime:  metav1.NewTime(heartbeat),
    		}
    	}
    	return &v1.NodeCondition{
    		Type:               v1.NodeReady,
    		Status:             v1.ConditionFalse,
    		Reason:             "KubeletNotReady",
    		Message:            message,
    		LastTransitionTime: metav1.NewTime(transition),
    		LastHeartbeatTime:  metav1.NewTime(heartbeat),
    	}
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Apr 25 21:47:24 UTC 2024
    - 76.1K bytes
    - Viewed (0)
  4. pkg/kubelet/server/stats/summary_test.go

    	assert := assert.New(t)
    
    	podStats := []statsapi.PodStats{
    		{
    			PodRef:      statsapi.PodReference{Name: "test-pod", Namespace: "test-namespace", UID: "UID_test-pod"},
    			StartTime:   metav1.NewTime(time.Now()),
    			Containers:  []statsapi.ContainerStats{*getContainerStats()},
    			Network:     getNetworkStats(),
    			VolumeStats: []statsapi.VolumeStats{*getVolumeStats()},
    		},
    	}
    	cgroupStatsMap := map[string]struct {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Mar 07 08:12:16 UTC 2024
    - 15.1K bytes
    - Viewed (0)
  5. staging/src/k8s.io/apiserver/pkg/storageversion/updater.go

    	}
    
    	condition := v1alpha1.StorageVersionCondition{
    		Type:               v1alpha1.AllEncodingVersionsEqual,
    		Status:             v1alpha1.ConditionFalse,
    		ObservedGeneration: sv.Generation,
    		LastTransitionTime: metav1.NewTime(time.Now()),
    		Reason:             "CommonEncodingVersionUnset",
    		Message:            "Common encoding version unset",
    	}
    	if sv.Status.CommonEncodingVersion != nil {
    		condition.Status = v1alpha1.ConditionTrue
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Jun 29 22:40:54 UTC 2023
    - 6.9K bytes
    - Viewed (0)
  6. pkg/kubelet/stats/pidlimit/pidlimit_linux.go

    		rlimit.NumOfRunningProcesses = &procs
    	} else {
    		var info syscall.Sysinfo_t
    		syscall.Sysinfo(&info)
    		procs := int64(info.Procs)
    		rlimit.NumOfRunningProcesses = &procs
    	}
    
    	rlimit.Time = v1.NewTime(time.Now())
    
    	return rlimit, nil
    }
    
    func runningTaskCount() (int64, error) {
    	// Example: 1.36 3.49 4.53 2/3518 3715089
    	bytes, err := os.ReadFile("/proc/loadavg")
    	if err != nil {
    		return 0, err
    	}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sun Sep 17 09:24:29 UTC 2023
    - 2.4K bytes
    - Viewed (0)
  7. staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/time_test.go

    		}
    		if !reflect.DeepEqual(input, time) {
    			t.Errorf("Marshal->Unmarshal is not idempotent: '%v' vs '%v'", input, time)
    		}
    	}
    }
    
    func TestTimeEqual(t *testing.T) {
    	t1 := NewTime(time.Now())
    	cases := []struct {
    		name   string
    		x      *Time
    		y      *Time
    		result bool
    	}{
    		{"nil =? nil", nil, nil, true},
    		{"!nil =? !nil", &t1, &t1, true},
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 29 21:48:09 UTC 2024
    - 9.4K bytes
    - Viewed (0)
  8. staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/time.go

    // copy-by-assign, despite the presence of (unexported) Pointer fields.
    func (t *Time) DeepCopyInto(out *Time) {
    	*out = *t
    }
    
    // NewTime returns a wrapped instance of the provided time
    func NewTime(time time.Time) Time {
    	return Time{time}
    }
    
    // Date returns the Time corresponding to the supplied parameters
    // by wrapping time.Date.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 29 21:48:09 UTC 2024
    - 5.2K bytes
    - Viewed (0)
  9. pkg/scheduler/schedule_one_test.go

    			newPodCondition: &v1.PodCondition{
    				Type:               "newType",
    				Status:             "newStatus",
    				LastProbeTime:      metav1.NewTime(time.Date(2020, 5, 13, 1, 1, 1, 1, time.UTC)),
    				LastTransitionTime: metav1.NewTime(time.Date(2020, 5, 12, 1, 1, 1, 1, time.UTC)),
    				Reason:             "newReason",
    				Message:            "newMessage",
    			},
    			expectedPatchRequests:    1,
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jun 04 06:20:55 UTC 2024
    - 128.1K bytes
    - Viewed (0)
  10. pkg/kubelet/stats/provider_test.go

    	checkNetworkStats(t, "", containerInfoSeed, ns)
    	checkSwapStats(t, "", containerInfoSeed, containerInfo, cs.Swap)
    
    	assert.Equal(cgroupName, cs.Name)
    	assert.Equal(metav1.NewTime(containerInfo.Spec.CreationTime), cs.StartTime)
    }
    
    func TestGetCgroupCPUAndMemoryStats(t *testing.T) {
    	const (
    		cgroupName        = "test-cgroup-name"
    		containerInfoSeed = 1000
    		updateStats       = false
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Mar 07 08:12:16 UTC 2024
    - 20K bytes
    - Viewed (0)
Back to top