dmwm / dbs2go

DBS server written in Go
MIT License
5 stars 4 forks source link

Add DBSMigration integration tests #24

Closed vkuznet closed 2 years ago

vkuznet commented 2 years ago

We should add DBSMigration integration tests as following:

vkuznet commented 2 years ago

@d-ylee with this commit 1ac904d49e031008f522984f22f961978b2eeb3a I added code codebase required for DBS Migration test. The new test/migration_test.go file contains everything we need to start the migration process integration tests. It starts four DBS servers, see description in a code, and code is ready to implement actual migration.

vkuznet commented 2 years ago

and, I updated DBS databases with this commit d94d584d74908a56fd88a5eb2418c242d08c1548. Please see test/migration_test.go for explanation which DB will be used for which process. In total, we'll have 6 DBS servers used in DBS Migration process, two pairs (DBSReader/DBSWriter) associated with two databases, and DBSMigrate and DBSMigration servers used for migration process.

vkuznet commented 2 years ago

@d-ylee , I disabled TestMigrate function in test/migrate_test.go since it requires change of logic due to asynchronous behavior of migration process. Please adjust it. The migration request now requires two servers, DBSMigrate and DBSMigration, where later will pick up migration request and move it through transition states. Therefore, the test should check for COMPLETED status after some time when DBSMigration server will perform the migration.

vkuznet commented 2 years ago

@d-ylee should we close this issue, with your recent PR https://github.com/dmwm/dbs2go/pull/75 I think everything is done here. Please let me know.

d-ylee commented 2 years ago

@vkuznet I also think everything is done here. If there isn't anything else you can think of to resolve this issue, I think it is safe to close this issue. Thanks!