diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 9c43fc1..0e94c11 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -22,7 +22,7 @@ jobs: name: Tests (Rust only, latest main) uses: ./.github/workflows/single_sdk_tests.yml with: - use_rust_sdk: '628374b8d86653e733649a506f5ae70385cd4de1' # TODO: go back to main when it works with uniffi 0.25 again + use_rust_sdk: 'main' use_complement_crypto: '.' complement: diff --git a/tests/main_test.go b/tests/main_test.go index 6fd870b..56ae7ab 100644 --- a/tests/main_test.go +++ b/tests/main_test.go @@ -231,9 +231,11 @@ func (c *TestContext) WithAliceSyncing(t *testing.T, callback func(alice api.Cli func (c *TestContext) WithAliceAndBobSyncing(t *testing.T, callback func(alice, bob api.Client)) { t.Helper() must.NotEqual(t, c.Bob, nil, "No Bob defined. Call CreateTestContext() with at least 2 api.ClientTypes.") - c.WithClientSyncing(t, c.AliceClientType, c.Alice, func(alice api.Client) { + // we invert the order here because _typically_ Alice encrypts for Bob, so we want to make sure Bob has + // uploaded device keys before Alice starts syncing. + c.WithClientSyncing(t, c.BobClientType, c.Bob, func(bob api.Client) { t.Helper() - c.WithClientSyncing(t, c.BobClientType, c.Bob, func(bob api.Client) { + c.WithClientSyncing(t, c.AliceClientType, c.Alice, func(alice api.Client) { t.Helper() // Wait until Alice and Bob have probably both uploaded their room @@ -258,11 +260,13 @@ func (c *TestContext) WithAliceAndBobSyncing(t *testing.T, callback func(alice, func (c *TestContext) WithAliceBobAndCharlieSyncing(t *testing.T, callback func(alice, bob, charlie api.Client)) { t.Helper() must.NotEqual(t, c.Charlie, nil, "No Charlie defined. Call CreateTestContext() with at least 3 api.ClientTypes.") - c.WithClientSyncing(t, c.AliceClientType, c.Alice, func(alice api.Client) { + // we invert the order here because _typically_ Alice encrypts for Bob & Charlie, so we want to make sure they have + // uploaded device keys before Alice starts syncing. + c.WithClientSyncing(t, c.CharlieClientType, c.Charlie, func(charlie api.Client) { t.Helper() c.WithClientSyncing(t, c.BobClientType, c.Bob, func(bob api.Client) { t.Helper() - c.WithClientSyncing(t, c.CharlieClientType, c.Charlie, func(charlie api.Client) { + c.WithClientSyncing(t, c.AliceClientType, c.Alice, func(alice api.Client) { t.Helper() callback(alice, bob, charlie) })