@@ -176,50 +176,34 @@ func TestListPaging(t *testing.T) {
176176 storagetesting .RunTestListPaging (ctx , t , cacher )
177177}
178178
179- func TestList (t * testing.T ) {
179+ func TestLists (t * testing.T ) {
180180 for _ , consistentRead := range []bool {true , false } {
181- t .Run (fmt .Sprintf ("ConsistentListFromCache=%v" , consistentRead ), func (t * testing.T ) {
182- for _ , listFromCacheSnapshot := range []bool {true , false } {
183- t .Run (fmt .Sprintf ("ListFromCacheSnapsthot=%v" , listFromCacheSnapshot ), func (t * testing.T ) {
184- featuregatetesting .SetFeatureGateDuringTest (t , utilfeature .DefaultFeatureGate , features .ListFromCacheSnapshot , listFromCacheSnapshot )
185- featuregatetesting .SetFeatureGateDuringTest (t , utilfeature .DefaultFeatureGate , features .ConsistentListFromCache , consistentRead )
181+ for _ , listFromCacheSnapshot := range []bool {true , false } {
182+ t .Run (fmt .Sprintf ("ConsistentListFromCache=%v,ListFromCacheSnapshot=%v" , consistentRead , listFromCacheSnapshot ), func (t * testing.T ) {
183+ featuregatetesting .SetFeatureGateDuringTest (t , utilfeature .DefaultFeatureGate , features .ListFromCacheSnapshot , listFromCacheSnapshot )
184+ featuregatetesting .SetFeatureGateDuringTest (t , utilfeature .DefaultFeatureGate , features .ConsistentListFromCache , consistentRead )
185+ t .Run ("List" , func (t * testing.T ) {
186+ t .Parallel ()
186187 ctx , cacher , server , terminate := testSetupWithEtcdServer (t )
187188 t .Cleanup (terminate )
188189 storagetesting .RunTestList (ctx , t , cacher , increaseRV (server .V3Client .Client ), true )
189190 })
190- }
191- })
192- }
193- }
194- func TestConsistentList (t * testing.T ) {
195- for _ , consistentRead := range []bool {true , false } {
196- t .Run (fmt .Sprintf ("ConsistentListFromCache=%v" , consistentRead ), func (t * testing.T ) {
197- for _ , listFromCacheSnapshot := range []bool {true , false } {
198- t .Run (fmt .Sprintf ("ListFromCacheSnapsthot=%v" , listFromCacheSnapshot ), func (t * testing.T ) {
199- featuregatetesting .SetFeatureGateDuringTest (t , utilfeature .DefaultFeatureGate , features .ListFromCacheSnapshot , listFromCacheSnapshot )
200- featuregatetesting .SetFeatureGateDuringTest (t , utilfeature .DefaultFeatureGate , features .ConsistentListFromCache , consistentRead )
191+
192+ t .Run ("ConsistentList" , func (t * testing.T ) {
193+ t .Parallel ()
201194 ctx , cacher , server , terminate := testSetupWithEtcdServer (t )
202195 t .Cleanup (terminate )
203196 storagetesting .RunTestConsistentList (ctx , t , cacher , increaseRV (server .V3Client .Client ), true , consistentRead , listFromCacheSnapshot )
204197 })
205- }
206- })
207- }
208- }
209198
210- func TestGetListNonRecursive (t * testing.T ) {
211- for _ , consistentRead := range []bool {true , false } {
212- t .Run (fmt .Sprintf ("ConsistentListFromCache=%v" , consistentRead ), func (t * testing.T ) {
213- for _ , listFromCacheSnapshot := range []bool {true , false } {
214- t .Run (fmt .Sprintf ("ListFromCacheSnapsthot=%v" , listFromCacheSnapshot ), func (t * testing.T ) {
215- featuregatetesting .SetFeatureGateDuringTest (t , utilfeature .DefaultFeatureGate , features .ListFromCacheSnapshot , listFromCacheSnapshot )
216- featuregatetesting .SetFeatureGateDuringTest (t , utilfeature .DefaultFeatureGate , features .ConsistentListFromCache , consistentRead )
199+ t .Run ("GetListNonRecursive" , func (t * testing.T ) {
200+ t .Parallel ()
217201 ctx , cacher , server , terminate := testSetupWithEtcdServer (t )
218202 t .Cleanup (terminate )
219203 storagetesting .RunTestGetListNonRecursive (ctx , t , increaseRV (server .V3Client .Client ), cacher )
220204 })
221- }
222- })
205+ })
206+ }
223207 }
224208}
225209
0 commit comments