@@ -271,15 +271,23 @@ func TestClosestReplicaReadChecker(t *testing.T) {
271
271
272
272
mockedAllServerInfos := map [string ]* infosync.ServerInfo {
273
273
"s1" : {
274
- ID : "s1" ,
275
- Labels : map [string ]string {
276
- "zone" : "zone1" ,
274
+ StaticServerInfo : infosync.StaticServerInfo {
275
+ ID : "s1" ,
276
+ },
277
+ DynamicServerInfo : infosync.DynamicServerInfo {
278
+ Labels : map [string ]string {
279
+ "zone" : "zone1" ,
280
+ },
277
281
},
278
282
},
279
283
"s2" : {
280
- ID : "s2" ,
281
- Labels : map [string ]string {
282
- "zone" : "zone2" ,
284
+ StaticServerInfo : infosync.StaticServerInfo {
285
+ ID : "s2" ,
286
+ },
287
+ DynamicServerInfo : infosync.DynamicServerInfo {
288
+ Labels : map [string ]string {
289
+ "zone" : "zone2" ,
290
+ },
283
291
},
284
292
},
285
293
}
@@ -345,33 +353,53 @@ func TestClosestReplicaReadChecker(t *testing.T) {
345
353
// partial matches
346
354
mockedAllServerInfos = map [string ]* infosync.ServerInfo {
347
355
"s1" : {
348
- ID : "s1" ,
349
- Labels : map [string ]string {
350
- "zone" : "zone1" ,
356
+ StaticServerInfo : infosync.StaticServerInfo {
357
+ ID : "s1" ,
358
+ },
359
+ DynamicServerInfo : infosync.DynamicServerInfo {
360
+ Labels : map [string ]string {
361
+ "zone" : "zone1" ,
362
+ },
351
363
},
352
364
},
353
365
"s2" : {
354
- ID : "s2" ,
355
- Labels : map [string ]string {
356
- "zone" : "zone2" ,
366
+ StaticServerInfo : infosync.StaticServerInfo {
367
+ ID : "s2" ,
368
+ },
369
+ DynamicServerInfo : infosync.DynamicServerInfo {
370
+ Labels : map [string ]string {
371
+ "zone" : "zone2" ,
372
+ },
357
373
},
358
374
},
359
375
"s22" : {
360
- ID : "s22" ,
361
- Labels : map [string ]string {
362
- "zone" : "zone2" ,
376
+ StaticServerInfo : infosync.StaticServerInfo {
377
+ ID : "s22" ,
378
+ },
379
+ DynamicServerInfo : infosync.DynamicServerInfo {
380
+ Labels : map [string ]string {
381
+ "zone" : "zone2" ,
382
+ },
363
383
},
364
384
},
365
385
"s3" : {
366
- ID : "s3" ,
367
- Labels : map [string ]string {
368
- "zone" : "zone3" ,
386
+ StaticServerInfo : infosync.StaticServerInfo {
387
+ ID : "s3" ,
388
+ },
389
+ DynamicServerInfo : infosync.DynamicServerInfo {
390
+ Labels : map [string ]string {
391
+ "zone" : "zone3" ,
392
+ },
369
393
},
370
394
},
371
395
"s4" : {
372
- ID : "s4" ,
373
- Labels : map [string ]string {
374
- "zone" : "zone4" ,
396
+ StaticServerInfo : infosync.StaticServerInfo {
397
+ ID : "s4" ,
398
+ },
399
+ DynamicServerInfo : infosync.DynamicServerInfo {
400
+ Labels : map [string ]string {
401
+ "zone" : "zone4" ,
402
+ },
375
403
},
376
404
},
377
405
}
0 commit comments