Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 15 for NewCycleState (0.62 sec)

  1. pkg/scheduler/framework/plugins/volumerestrictions/volume_restrictions_test.go

    	}
    
    	for _, test := range tests {
    		t.Run(test.name, func(t *testing.T) {
    			ctx, cancel := context.WithCancel(context.Background())
    			defer cancel()
    			p := newPlugin(ctx, t)
    			cycleState := framework.NewCycleState()
    			_, preFilterGotStatus := p.(framework.PreFilterPlugin).PreFilter(ctx, cycleState, test.pod)
    			if diff := cmp.Diff(test.preFilterWantStatus, preFilterGotStatus); diff != "" {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Oct 20 17:40:39 UTC 2023
    - 17.3K bytes
    - Viewed (0)
  2. pkg/scheduler/framework/plugins/volumezone/volume_zone_test.go

    	}
    
    	for _, test := range tests {
    		t.Run(test.name, func(t *testing.T) {
    			_, ctx := ktesting.NewTestContext(t)
    			ctx, cancel := context.WithCancel(ctx)
    			defer cancel()
    
    			state := framework.NewCycleState()
    			node := &framework.NodeInfo{}
    			node.SetNode(test.Node)
    			p := &VolumeZone{
    				pvLister,
    				pvcLister,
    				nil,
    			}
    			_, preFilterStatus := p.PreFilter(ctx, state, test.Pod)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Dec 14 05:17:04 UTC 2023
    - 20K bytes
    - Viewed (0)
  3. pkg/scheduler/framework/plugins/nodeports/node_ports_test.go

    		t.Run(test.name, func(t *testing.T) {
    			_, ctx := ktesting.NewTestContext(t)
    			p, err := New(ctx, nil, nil)
    			if err != nil {
    				t.Fatalf("creating plugin: %v", err)
    			}
    			cycleState := framework.NewCycleState()
    			_, preFilterStatus := p.(framework.PreFilterPlugin).PreFilter(ctx, cycleState, test.pod)
    			if diff := cmp.Diff(test.wantPreFilterStatus, preFilterStatus); diff != "" {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Oct 19 11:02:11 UTC 2023
    - 10.1K bytes
    - Viewed (0)
  4. pkg/scheduler/framework/plugins/noderesources/requested_to_capacity_ratio_test.go

    	}
    
    	for _, test := range tests {
    		t.Run(test.name, func(t *testing.T) {
    			_, ctx := ktesting.NewTestContext(t)
    			ctx, cancel := context.WithCancel(ctx)
    			defer cancel()
    
    			state := framework.NewCycleState()
    			snapshot := cache.NewSnapshot(test.existingPods, test.nodes)
    			fh, _ := runtime.NewFramework(ctx, nil, nil, runtime.WithSnapshotSharedLister(snapshot))
    
    			p, err := NewFit(ctx, &config.NodeResourcesFitArgs{
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Dec 15 03:30:06 UTC 2023
    - 21.2K bytes
    - Viewed (0)
  5. pkg/scheduler/framework/preemption/preemption_test.go

    			})
    
    			fakePostPlugin := &FakePostFilterPlugin{numViolatingVictim: tt.numViolatingVictim}
    
    			for cycle, pod := range tt.testPods {
    				state := framework.NewCycleState()
    				pe := Evaluator{
    					PluginName: "FakePostFilter",
    					Handler:    fwk,
    					Interface:  fakePostPlugin,
    					State:      state,
    				}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri May 31 15:52:16 UTC 2024
    - 18.7K bytes
    - Viewed (0)
  6. pkg/scheduler/framework/plugins/imagelocality/image_locality_test.go

    		t.Run(test.name, func(t *testing.T) {
    			_, ctx := ktesting.NewTestContext(t)
    			ctx, cancel := context.WithCancel(ctx)
    			defer cancel()
    
    			snapshot := cache.NewSnapshot(nil, test.nodes)
    			state := framework.NewCycleState()
    			fh, _ := runtime.NewFramework(ctx, nil, nil, runtime.WithSnapshotSharedLister(snapshot))
    
    			p, err := New(ctx, nil, fh)
    			if err != nil {
    				t.Fatalf("creating plugin: %v", err)
    			}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Feb 19 06:17:57 UTC 2024
    - 10.3K bytes
    - Viewed (0)
  7. pkg/scheduler/framework/plugins/noderesources/balanced_allocation_test.go

    			defer cancel()
    			fh, _ := runtime.NewFramework(ctx, nil, nil, runtime.WithSnapshotSharedLister(snapshot))
    			p, _ := NewBalancedAllocation(ctx, &test.args, fh, feature.Features{})
    			state := framework.NewCycleState()
    			for i := range test.nodes {
    				if test.runPreScore {
    					status := p.(framework.PreScorePlugin).PreScore(ctx, state, test.pod, tf.BuildNodeInfos(test.nodes))
    					if !status.IsSuccess() {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Dec 15 03:30:06 UTC 2023
    - 15.9K bytes
    - Viewed (0)
  8. pkg/scheduler/framework/plugins/noderesources/most_allocated_test.go

    	}
    
    	for _, test := range tests {
    		t.Run(test.name, func(t *testing.T) {
    			_, ctx := ktesting.NewTestContext(t)
    			ctx, cancel := context.WithCancel(ctx)
    			defer cancel()
    
    			state := framework.NewCycleState()
    			snapshot := cache.NewSnapshot(test.existingPods, test.nodes)
    			fh, _ := runtime.NewFramework(ctx, nil, nil, runtime.WithSnapshotSharedLister(snapshot))
    
    			p, err := NewFit(ctx,
    				&config.NodeResourcesFitArgs{
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Dec 15 03:30:06 UTC 2023
    - 16K bytes
    - Viewed (0)
  9. pkg/scheduler/framework/plugins/nodeaffinity/node_affinity_test.go

    			nodeInfo := framework.NewNodeInfo()
    			nodeInfo.SetNode(&node)
    
    			p, err := New(ctx, &test.args, nil)
    			if err != nil {
    				t.Fatalf("Creating plugin: %v", err)
    			}
    
    			state := framework.NewCycleState()
    			var gotStatus *framework.Status
    			if test.runPreFilter {
    				gotPreFilterResult, gotStatus := p.(framework.PreFilterPlugin).PreFilter(context.Background(), state, test.pod)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Dec 18 12:00:10 UTC 2023
    - 38.7K bytes
    - Viewed (0)
  10. pkg/scheduler/extender_test.go

    				Extenders:                extenders,
    				logger:                   logger,
    			}
    			sched.applyDefaultHandlers()
    
    			podIgnored := &v1.Pod{}
    			result, err := sched.SchedulePod(ctx, fwk, framework.NewCycleState(), podIgnored)
    			if test.expectsErr {
    				if err == nil {
    					t.Errorf("Unexpected non-error, result %+v", result)
    				}
    			} else {
    				if err != nil {
    					t.Errorf("Unexpected error: %v", err)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Feb 26 19:07:19 UTC 2024
    - 16.7K bytes
    - Viewed (0)
Back to top