@@ -371,6 +371,7 @@ abstract class TestRunner {
371
371
private persistence : Persistence ;
372
372
private sharedClientState : SharedClientState ;
373
373
private useGarbageCollection : boolean ;
374
+ private numClients : number ;
374
375
private databaseInfo : DatabaseInfo ;
375
376
376
377
protected user = User . UNAUTHENTICATED ;
@@ -402,6 +403,7 @@ abstract class TestRunner {
402
403
} ) ;
403
404
404
405
this . useGarbageCollection = config . useGarbageCollection ;
406
+ this . numClients = config . numClients ;
405
407
406
408
this . expectedLimboDocs = [ ] ;
407
409
this . expectedActiveTargets = { } ;
@@ -943,10 +945,7 @@ abstract class TestRunner {
943
945
this . expectedActiveTargets = expectation . activeTargets ! ;
944
946
}
945
947
if ( 'isPrimary' in expectation ) {
946
- expect ( this . syncEngine . isPrimaryClient ) . to . eq (
947
- expectation . isPrimary ! ,
948
- 'isPrimary'
949
- ) ;
948
+ expect ( this . isPrimaryClient ) . to . eq ( expectation . isPrimary ! , 'isPrimary' ) ;
950
949
}
951
950
if ( 'userCallbacks' in expectation ) {
952
951
expect ( this . acknowledgedDocs ) . to . have . members (
@@ -958,6 +957,10 @@ abstract class TestRunner {
958
957
}
959
958
}
960
959
960
+ if ( this . numClients === 1 ) {
961
+ expect ( this . isPrimaryClient ) . to . eq ( true , 'isPrimary' ) ;
962
+ }
963
+
961
964
// Clients don't reset their limbo docs on shutdown, so any validation will
962
965
// likely fail.
963
966
if ( this . started ) {
0 commit comments