@@ -520,7 +520,13 @@ func setupCRDAndVerifySchema(f *framework.Framework, schema, expect []byte, grou
520520 return setupCRDAndVerifySchemaWithOptions (f , schema , expect , groupSuffix , versions )
521521}
522522
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+ }()
524530 group := fmt .Sprintf ("%s-test-%s.example.com" , f .BaseName , groupSuffix )
525531 if len (versions ) == 0 {
526532 return nil , fmt .Errorf ("require at least one version for CRD" )
@@ -558,17 +564,17 @@ func setupCRDAndVerifySchemaWithOptions(f *framework.Framework, schema, expect [
558564 }
559565 crd .Spec .Versions = apiVersions
560566 })
561- crd , err : = crd .CreateMultiVersionTestCRD (f , group , options ... )
567+ tCRD , err = crd .CreateMultiVersionTestCRD (f , group , options ... )
562568 if err != nil {
563569 return nil , fmt .Errorf ("failed to create CRD: %v" , err )
564570 }
565571
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 {
568574 return nil , fmt .Errorf ("%v" , err )
569575 }
570576 }
571- return crd , nil
577+ return tCRD , nil
572578}
573579
574580func cleanupCRD (f * framework.Framework , crd * crd.TestCrd ) error {
0 commit comments