fix: drop the global persistenceServiceFacade

This commit is contained in:
c9s 2023-04-26 00:42:33 +08:00
parent a13ad2f6ab
commit 3d7cdd9938
No known key found for this signature in database
GPG Key ID: 7385E7E464CB0A54
2 changed files with 1 additions and 3 deletions

View File

@ -20,5 +20,5 @@ func TestNewDefaultIsolation(t *testing.T) {
assert.NotNil(t, isolation)
assert.NotNil(t, isolation.persistenceServiceFacade)
assert.NotNil(t, isolation.gracefulShutdown)
assert.Equal(t, persistenceServiceFacade, isolation.persistenceServiceFacade)
assert.Equal(t, defaultPersistenceServiceFacade, isolation.persistenceServiceFacade)
}

View File

@ -17,8 +17,6 @@ var defaultPersistenceServiceFacade = &service.PersistenceServiceFacade{
Memory: service.NewMemoryService(),
}
var persistenceServiceFacade = defaultPersistenceServiceFacade
// Sync syncs the object properties into the persistence layer
func Sync(ctx context.Context, obj interface{}) {
id := dynamic.CallID(obj)