File tree Expand file tree Collapse file tree 2 files changed +3
-12
lines changed Expand file tree Collapse file tree 2 files changed +3
-12
lines changed Original file line number Diff line number Diff line change @@ -345,17 +345,13 @@ export class OnlineComponentProvider {
345
345
await this . remoteStore . applyPrimaryState ( this . syncEngine . isPrimaryClient ) ;
346
346
}
347
347
348
- protected loadConnection ( cfg : ComponentConfiguration ) : Connection {
349
- return newConnection ( cfg . databaseInfo ) ;
350
- }
351
-
352
348
createEventManager ( cfg : ComponentConfiguration ) : EventManager {
353
349
return new EventManager ( this . syncEngine ) ;
354
350
}
355
351
356
352
createDatastore ( cfg : ComponentConfiguration ) : Datastore {
357
353
const serializer = newSerializer ( cfg . databaseInfo . databaseId ) ;
358
- const connection = this . loadConnection ( cfg ) ;
354
+ const connection = newConnection ( cfg . databaseInfo ) ;
359
355
return newDatastore ( cfg . credentials , connection , serializer ) ;
360
356
}
361
357
Original file line number Diff line number Diff line change @@ -122,18 +122,13 @@ function failTransactionIfNeeded(
122
122
123
123
export class MockOnlineComponentProvider extends OnlineComponentProvider {
124
124
connection ! : MockConnection ;
125
-
126
- async loadConnection ( cfg : ComponentConfiguration ) : Promise < Connection > {
127
- this . connection = new MockConnection ( cfg . asyncQueue ) ;
128
- return this . connection ;
129
- }
130
-
125
+
131
126
createDatastore ( cfg : ComponentConfiguration ) : Datastore {
132
127
const serializer = new JsonProtoSerializer (
133
128
cfg . databaseInfo . databaseId ,
134
129
/* useProto3Json= */ true
135
130
) ;
136
- return newDatastore ( cfg . credentials , serializer ) ;
131
+ return newDatastore ( cfg . credentials , new MockConnection ( cfg . asyncQueue ) , serializer ) ;
137
132
}
138
133
}
139
134
You can’t perform that action at this time.
0 commit comments