Skip to content

Commit 42064e0

Browse files
authored
Merge pull request kubernetes#125973 from fxierh/sample-apiserver-e2e-race-fix
Mark test cases which set up a sample-apiserver as serial
2 parents 06c7d9a + 9cdacdc commit 42064e0

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

test/e2e/apimachinery/aggregator.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,12 @@ func generateSampleAPIServerObjectNames(namespace string) sampleAPIServerObjectN
131131
}
132132
}
133133

134+
// SetUpSampleAPIServer sets up a sample-apiserver.
135+
//
136+
// Important:
137+
// Test cases that call this function should be marked as serial due to potential conflicts
138+
// with other test cases that also set up a sample-apiserver. For more information, see
139+
// https://github.com/kubernetes/kubernetes/issues/119582#issuecomment-2215054411.
134140
func SetUpSampleAPIServer(ctx context.Context, f *framework.Framework, aggrclient *aggregatorclient.Clientset, image string, n sampleAPIServerObjectNames, apiServiceGroupName, apiServiceVersion string) {
135141
ginkgo.By("Registering the sample API server.")
136142
client := f.ClientSet

test/e2e/apimachinery/openapiv3.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,8 +168,11 @@ var _ = SIGDescribe("OpenAPIV3", func() {
168168
Release : v1.27
169169
Testname: OpenAPI V3 Aggregated APIServer
170170
Description: Create an Aggregated APIServer. The OpenAPI V3 for the aggregated apiserver MUST be aggregated by the aggregator and published. The specification MUST be round trippable.
171+
172+
This test case is marked as serial due to potential conflicts with other test cases that set up a sample-apiserver.
173+
For more information, see: https://github.com/kubernetes/kubernetes/issues/119582#issuecomment-2215054411.
171174
*/
172-
ginkgo.It("should contain OpenAPI V3 for Aggregated APIServer", func(ctx context.Context) {
175+
f.It("should contain OpenAPI V3 for Aggregated APIServer", f.WithSerial(), func(ctx context.Context) {
173176
config, err := framework.LoadConfig()
174177
framework.ExpectNoError(err)
175178
aggrclient, err := aggregatorclient.NewForConfig(config)

0 commit comments

Comments
 (0)