-
Notifications
You must be signed in to change notification settings - Fork 121
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix universe sync test #366
Conversation
@@ -728,7 +728,7 @@ func assertUniverseStateEqual(t *testing.T, a, b *tapdHarness) { | |||
rootsA, err := a.AssetRoots(ctxb, &unirpc.AssetRootRequest{}) | |||
require.NoError(t, err) | |||
|
|||
rootsB, err := a.AssetRoots(ctxb, &unirpc.AssetRootRequest{}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice catch
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch! 💯
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🧢
func assertUniverseStateEqual(t *testing.T, a, b *tapdHarness) { | ||
ctxb := context.Background() | ||
|
||
rootsA, err := a.AssetRoots(ctxb, &unirpc.AssetRootRequest{}) | ||
require.NoError(t, err) | ||
|
||
rootsB, err := a.AssetRoots(ctxb, &unirpc.AssetRootRequest{}) | ||
rootsB, err := b.AssetRoots(ctxb, &unirpc.AssetRootRequest{}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🙈
|
||
t.Helper() | ||
|
||
require.Eventually(t, func() bool { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ahh, this super useful!
Otherwise you need to modify things to return an error for the usual wait
instances.
Found while trying to reproduce a different error.
Looks like we didn't really compare the correct universe roots in the integration tests.