@@ -34,6 +34,7 @@ func TestRealloc(t *testing.T) {
34
34
ctx := context .Background ()
35
35
store := & storemocks.Store {}
36
36
c .store = store
37
+ c .config .Scheduler .ShareBase = 100
37
38
38
39
lock := & lockmocks.DistributedLock {}
39
40
lock .On ("Lock" , mock .Anything ).Return (nil )
@@ -50,6 +51,7 @@ func TestRealloc(t *testing.T) {
50
51
Name : "node1" ,
51
52
MemCap : int64 (units .GiB ),
52
53
CPU : types.CPUMap {"0" : 10 , "1" : 70 , "2" : 10 , "3" : 100 },
54
+ InitCPU : types.CPUMap {"0" : 100 , "1" : 100 , "2" : 100 , "3" : 100 },
53
55
Engine : engine ,
54
56
Endpoint : "http://1.1.1.1:1" ,
55
57
NUMA : types.NUMA {"2" : "0" },
@@ -210,6 +212,7 @@ func TestRealloc(t *testing.T) {
210
212
Name : "node2" ,
211
213
MemCap : int64 (units .GiB ),
212
214
CPU : types.CPUMap {"0" : 10 , "1" : 70 , "2" : 10 , "3" : 100 },
215
+ InitCPU : types.CPUMap {"0" : 100 , "1" : 100 , "2" : 100 , "3" : 100 },
213
216
Engine : engine ,
214
217
Endpoint : "http://1.1.1.1:1" ,
215
218
NUMA : types.NUMA {"2" : "0" },
@@ -406,6 +409,7 @@ func TestReallocVolume(t *testing.T) {
406
409
407
410
func TestReallocBindCpu (t * testing.T ) {
408
411
c := NewTestCluster ()
412
+ c .config .Scheduler .ShareBase = 100
409
413
ctx := context .Background ()
410
414
store := & storemocks.Store {}
411
415
c .store = store
@@ -445,6 +449,7 @@ func TestReallocBindCpu(t *testing.T) {
445
449
Name : "node3" ,
446
450
MemCap : int64 (units .GiB ),
447
451
CPU : types.CPUMap {"0" : 10 , "1" : 70 , "2" : 10 , "3" : 100 },
452
+ InitCPU : types.CPUMap {"0" : 100 , "1" : 100 , "2" : 100 , "3" : 100 },
448
453
CPUUsed : 2.1 ,
449
454
Engine : engine ,
450
455
Endpoint : "http://1.1.1.1:1" ,
0 commit comments