mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 19:56:01 +00:00
Merge pull request #98792 from wzshiming/ut/speed-up-persistentvolume
Speed up pkg/controller/volume/persistentvolume unit tests
This commit is contained in:
commit
18605d8814
@ -713,7 +713,7 @@ func runSyncTests(t *testing.T, tests []controllerTest, storageClasses []*storag
|
||||
// of volumes/claims with expected claims/volumes and report differences.
|
||||
// Some limit of calls in enforced to prevent endless loops.
|
||||
func runMultisyncTests(t *testing.T, tests []controllerTest, storageClasses []*storage.StorageClass, defaultStorageClass string) {
|
||||
for _, test := range tests {
|
||||
run := func(t *testing.T, test controllerTest) {
|
||||
klog.V(4).Infof("starting multisync test %q", test.name)
|
||||
|
||||
// Initialize the controller
|
||||
@ -822,6 +822,13 @@ func runMultisyncTests(t *testing.T, tests []controllerTest, storageClasses []*s
|
||||
evaluateTestResults(ctrl, reactor.VolumeReactor, test, t)
|
||||
klog.V(4).Infof("test %q finished after %d iterations", test.name, counter)
|
||||
}
|
||||
|
||||
for _, test := range tests {
|
||||
t.Run(test.name, func(t *testing.T) {
|
||||
t.Parallel()
|
||||
run(t, test)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
// Dummy volume plugin for provisioning, deletion and recycling. It contains
|
||||
|
Loading…
Reference in New Issue
Block a user