| Safe Haskell | None |
|---|---|
| Language | GHC2021 |
Test.Conversation.Migration
Description
The migration has these phases. 1. Write to cassandra (before any migration activity) 2. Galley is prepared for migrations (new things created in PG, old things are in Cassandra) 3. Backgound worker starts migration 4. Background worker finishes migration, galley is still configured to think migration is on going 5. Background worker is configured to not do anything, galley is configured to only use PG
The comments and variable names call these phases by number i.e. Phase1, Phase2, and so on.
The tests are from the perspective of mel, a user on the dynamic backend, called backendM (migrating backend). There are also users called mark and mia on this backend.
Synopsis
- testMigrationToPostgresMLS :: App ()
- testMigrationToPostgresProteus :: App ()
- data TestConvList = TestConvList {
- unmodifiedConvs :: [ConvId]
- kickMelConvs :: IntMap [ConvId]
- kickMarkConvs :: IntMap [ConvId]
- delConvs :: IntMap [ConvId]
- addMelConvs :: IntMap [ConvId]
- waitForMigration :: HasCallStack => String -> App ()
- phase1Overrides :: ServiceOverrides
- phase2Overrides :: ServiceOverrides
- phase3Overrides :: ServiceOverrides
- phase4Overrides :: ServiceOverrides
- phase5Overrides :: ServiceOverrides
- phaseOverrides :: IntMap ServiceOverrides
Documentation
testMigrationToPostgresMLS :: App () Source #
Our test setup cannot process updates to many MLS convs concurrently, so we run this will only 1 conv per type per phase and use no concurrency.
data TestConvList Source #
Constructors
| TestConvList | |
Fields
| |
Instances
| ToJSON TestConvList Source # | |
Defined in Test.Conversation.Migration Methods toJSON :: TestConvList -> Value Source # toEncoding :: TestConvList -> Encoding Source # toJSONList :: [TestConvList] -> Value Source # toEncodingList :: [TestConvList] -> Encoding Source # omitField :: TestConvList -> Bool Source # | |
| Semigroup TestConvList Source # | |
Defined in Test.Conversation.Migration Methods (<>) :: TestConvList -> TestConvList -> TestConvList # sconcat :: NonEmpty TestConvList -> TestConvList # stimes :: Integral b => b -> TestConvList -> TestConvList # | |
waitForMigration :: HasCallStack => String -> App () Source #