@@ -520,7 +520,13 @@ func setupCRDAndVerifySchema(f *framework.Framework, schema, expect []byte, grou
520
520
return setupCRDAndVerifySchemaWithOptions (f , schema , expect , groupSuffix , versions )
521
521
}
522
522
523
- func setupCRDAndVerifySchemaWithOptions (f * framework.Framework , schema , expect []byte , groupSuffix string , versions []string , options ... crd.Option ) (* crd.TestCrd , error ) {
523
+ func setupCRDAndVerifySchemaWithOptions (f * framework.Framework , schema , expect []byte , groupSuffix string , versions []string , options ... crd.Option ) (tCRD * crd.TestCrd , err error ) {
524
+ defer func () {
525
+ if err == nil {
526
+ framework .Logf ("sleeping 45 seconds before running the actual tests, we hope that during all API servers converge during that window, see %q for more" , "https://github.com/kubernetes/kubernetes/pull/90452" )
527
+ time .Sleep (time .Second * 45 )
528
+ }
529
+ }()
524
530
group := fmt .Sprintf ("%s-test-%s.example.com" , f .BaseName , groupSuffix )
525
531
if len (versions ) == 0 {
526
532
return nil , fmt .Errorf ("require at least one version for CRD" )
@@ -558,17 +564,17 @@ func setupCRDAndVerifySchemaWithOptions(f *framework.Framework, schema, expect [
558
564
}
559
565
crd .Spec .Versions = apiVersions
560
566
})
561
- crd , err : = crd .CreateMultiVersionTestCRD (f , group , options ... )
567
+ tCRD , err = crd .CreateMultiVersionTestCRD (f , group , options ... )
562
568
if err != nil {
563
569
return nil , fmt .Errorf ("failed to create CRD: %v" , err )
564
570
}
565
571
566
- for _ , v := range crd .Crd .Spec .Versions {
567
- if err := waitForDefinition (f .ClientSet , definitionName (crd , v .Name ), expect ); err != nil {
572
+ for _ , v := range tCRD .Crd .Spec .Versions {
573
+ if err := waitForDefinition (f .ClientSet , definitionName (tCRD , v .Name ), expect ); err != nil {
568
574
return nil , fmt .Errorf ("%v" , err )
569
575
}
570
576
}
571
- return crd , nil
577
+ return tCRD , nil
572
578
}
573
579
574
580
func cleanupCRD (f * framework.Framework , crd * crd.TestCrd ) error {
0 commit comments