updated code comments and renamed async/sync db to concurrent/nonconcurrent db

This commit is contained in:
Gani Georgiev
2022-12-16 13:07:58 +02:00
parent c25e67e13d
commit 89de29fc84
8 changed files with 77 additions and 78 deletions

View File

@@ -24,17 +24,17 @@ func TestNewMultiDB(t *testing.T) {
testApp, _ := tests.NewTestApp()
defer testApp.Cleanup()
dao := daos.NewMultiDB(testApp.Dao().AsyncDB(), testApp.Dao().SyncDB())
dao := daos.NewMultiDB(testApp.Dao().ConcurrentDB(), testApp.Dao().NonconcurrentDB())
if dao.DB() != testApp.Dao().AsyncDB() {
if dao.DB() != testApp.Dao().ConcurrentDB() {
t.Fatal("[db-asyncdb] The 2 db instances are different")
}
if dao.AsyncDB() != testApp.Dao().AsyncDB() {
if dao.ConcurrentDB() != testApp.Dao().ConcurrentDB() {
t.Fatal("[asyncdb-asyncdb] The 2 db instances are different")
}
if dao.SyncDB() != testApp.Dao().SyncDB() {
if dao.NonconcurrentDB() != testApp.Dao().NonconcurrentDB() {
t.Fatal("[syncdb-syncdb] The 2 db instances are different")
}
}