Skip to content

Commit

Permalink
Comment out unit test that triggers fake client bug
Browse files Browse the repository at this point in the history
The fake client has a channel size of 100, which seems to be re-used, as
running all our permutations fills it up. See
kubernetes/kubernetes#116700
  • Loading branch information
Kidswiss committed Sep 18, 2024
1 parent 2ec5fab commit 5b26fd1
Showing 1 changed file with 36 additions and 34 deletions.
70 changes: 36 additions & 34 deletions pkg/maintenance/postgresql_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -403,40 +403,42 @@ func TestPostgreSQL_DoMaintenance(t *testing.T) {
server: getVersionTestHTTPServer(t),
shouldSkipRepack: true,
},
{
name: "GivenMaintenanceTooLong_WithUnrelatedSecupdate_ThenExpectNoRepack",
maintTimeout: 2 * time.Second,
objs: []client.Object{
&stackgresv1.SGCluster{
ObjectMeta: metav1.ObjectMeta{
Name: "cluster",
Namespace: "default",
},
Spec: stackgresv1.SGClusterSpec{
Postgres: stackgresv1.SGClusterSpecPostgres{
Version: "15.0",
},
},
},
&stackgresv1.SGDbOps{
ObjectMeta: metav1.ObjectMeta{
Name: "unrelated-securitymaintenance",
Namespace: "default",
},
Spec: stackgresv1.SGDbOpsSpec{
Op: "securityUpgrade",
SgCluster: "cluster",
MaxRetries: pointer.Int(1),
SecurityUpgrade: &stackgresv1.SGDbOpsSpecSecurityUpgrade{
Method: pointer.String("InPlace"),
},
},
},
},
server: getVersionTestHTTPServer(t),
updatedOps: "securityUpgrade",
shouldSkipRepack: true,
},
// This test fills up the watcher channel, which is currently hardcoded to size 100
// See https://github.com/kubernetes/kubernetes/issues/116700
// {
// name: "GivenMaintenanceTooLong_WithUnrelatedSecupdate_ThenExpectNoRepack",
// maintTimeout: 2 * time.Second,
// objs: []client.Object{
// &stackgresv1.SGCluster{
// ObjectMeta: metav1.ObjectMeta{
// Name: "cluster",
// Namespace: "default",
// },
// Spec: stackgresv1.SGClusterSpec{
// Postgres: stackgresv1.SGClusterSpecPostgres{
// Version: "15.0",
// },
// },
// },
// &stackgresv1.SGDbOps{
// ObjectMeta: metav1.ObjectMeta{
// Name: "unrelated-securitymaintenance",
// Namespace: "default",
// },
// Spec: stackgresv1.SGDbOpsSpec{
// Op: "securityUpgrade",
// SgCluster: "cluster",
// MaxRetries: pointer.Int(1),
// SecurityUpgrade: &stackgresv1.SGDbOpsSpecSecurityUpgrade{
// Method: pointer.String("InPlace"),
// },
// },
// },
// },
// server: getVersionTestHTTPServer(t),
// updatedOps: "securityUpgrade",
// shouldSkipRepack: true,
// },
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
Expand Down

0 comments on commit 5b26fd1

Please sign in to comment.