Revert "Unistore : Ensure Watch works in HA mode." (#94097)

Revert "Unistore : Ensure Watch works in HA mode. (#93428)"

This reverts commit 0a26c9e9ae.
This commit is contained in:
Georges Chaudy
2024-10-01 18:45:47 +00:00
committed by GitHub
parent 78290301f4
commit 7c3fc2f261
28 changed files with 699 additions and 475 deletions
+16 -19
View File
@@ -1407,25 +1407,22 @@ func RunWatchSemantics(ctx context.Context, t *testing.T, store storage.Interfac
podsAfterEstablishingWatch: []*example.Pod{makePod("4"), makePod("5")},
expectedEventsAfterEstablishingWatch: addEventsFromCreatedPods,
},
// Not Supported by unistore because there is no way to differentiate between:
// - SendInitialEvents=nil && resourceVersion=0
// - sendInitialEvents=false && resourceVersion=0
// This is a Legacy feature in k8s.io/apiserver/pkg/storage/etcd3/watcher_test.go#196
// {
// name: "legacy, RV=0",
// resourceVersion: "0",
// initialPods: []*example.Pod{makePod("1"), makePod("2"), makePod("3")},
// expectedInitialEventsInRandomOrder: addEventsFromCreatedPods,
// podsAfterEstablishingWatch: []*example.Pod{makePod("4"), makePod("5")},
// expectedEventsAfterEstablishingWatch: addEventsFromCreatedPods,
// },
// {
// name: "legacy, RV=unset",
// initialPods: []*example.Pod{makePod("1"), makePod("2"), makePod("3")},
// expectedInitialEventsInRandomOrder: addEventsFromCreatedPods,
// podsAfterEstablishingWatch: []*example.Pod{makePod("4"), makePod("5")},
// expectedEventsAfterEstablishingWatch: addEventsFromCreatedPods,
// },
{
name: "legacy, RV=0",
resourceVersion: "0",
initialPods: []*example.Pod{makePod("1"), makePod("2"), makePod("3")},
expectedInitialEventsInRandomOrder: addEventsFromCreatedPods,
podsAfterEstablishingWatch: []*example.Pod{makePod("4"), makePod("5")},
expectedEventsAfterEstablishingWatch: addEventsFromCreatedPods,
},
{
name: "legacy, RV=unset",
initialPods: []*example.Pod{makePod("1"), makePod("2"), makePod("3")},
expectedInitialEventsInRandomOrder: addEventsFromCreatedPods,
podsAfterEstablishingWatch: []*example.Pod{makePod("4"), makePod("5")},
expectedEventsAfterEstablishingWatch: addEventsFromCreatedPods,
},
}
for idx, scenario := range scenarios {
t.Run(scenario.name, func(t *testing.T) {