Revert "Enable paralellism in scheduler unit tests"

This reverts commit f37ab167f8.

Signed-off-by: Monis Khan <mok@microsoft.com>
This commit is contained in:
Monis Khan
2022-09-23 12:00:14 -04:00
parent 664f0f5677
commit f01295067f
4 changed files with 0 additions and 79 deletions

View File

@@ -49,7 +49,6 @@ import (
)
func TestSchedulerCreation(t *testing.T) {
t.Parallel()
invalidRegistry := map[string]frameworkruntime.PluginFactory{
defaultbinder.Name: defaultbinder.New,
}
@@ -167,9 +166,7 @@ func TestSchedulerCreation(t *testing.T) {
}
for _, tc := range cases {
tc := tc
t.Run(tc.name, func(t *testing.T) {
t.Parallel()
client := fake.NewSimpleClientset()
informerFactory := informers.NewSharedInformerFactory(client, 0)
@@ -234,7 +231,6 @@ func TestSchedulerCreation(t *testing.T) {
}
func TestFailureHandler(t *testing.T) {
t.Parallel()
testPod := st.MakePod().Name("test-pod").Namespace(v1.NamespaceDefault).Obj()
testPodUpdated := testPod.DeepCopy()
testPodUpdated.Labels = map[string]string{"foo": ""}
@@ -266,9 +262,7 @@ func TestFailureHandler(t *testing.T) {
}
for _, tt := range tests {
tt := tt
t.Run(tt.name, func(t *testing.T) {
t.Parallel()
ctx, cancel := context.WithCancel(context.Background())
defer cancel()
@@ -320,7 +314,6 @@ func TestFailureHandler(t *testing.T) {
}
func TestFailureHandler_NodeNotFound(t *testing.T) {
t.Parallel()
nodeFoo := &v1.Node{ObjectMeta: metav1.ObjectMeta{Name: "foo"}}
nodeBar := &v1.Node{ObjectMeta: metav1.ObjectMeta{Name: "bar"}}
testPod := st.MakePod().Name("test-pod").Namespace(v1.NamespaceDefault).Obj()
@@ -347,9 +340,7 @@ func TestFailureHandler_NodeNotFound(t *testing.T) {
}
for _, tt := range tests {
tt := tt
t.Run(tt.name, func(t *testing.T) {
t.Parallel()
ctx, cancel := context.WithCancel(context.Background())
defer cancel()
@@ -392,7 +383,6 @@ func TestFailureHandler_NodeNotFound(t *testing.T) {
}
func TestFailureHandler_PodAlreadyBound(t *testing.T) {
t.Parallel()
ctx, cancel := context.WithCancel(context.Background())
defer cancel()
@@ -486,7 +476,6 @@ func initScheduler(stop <-chan struct{}, cache internalcache.Cache, queue intern
}
func TestInitPluginsWithIndexers(t *testing.T) {
t.Parallel()
tests := []struct {
name string
// the plugin registration ordering must not matter, being map traversal random
@@ -549,9 +538,7 @@ func TestInitPluginsWithIndexers(t *testing.T) {
}
for _, tt := range tests {
tt := tt
t.Run(tt.name, func(t *testing.T) {
t.Parallel()
fakeInformerFactory := NewInformerFactory(&fake.Clientset{}, 0*time.Second)
var registerPluginFuncs []st.RegisterPluginFunc