Skip to content
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

[bugfix] Fix occasional federatingdb test fail #792

Merged
merged 1 commit into from
Sep 1, 2022
Merged

Conversation

tsmethurst
Copy link
Contributor

We were getting this issue about half the time:

--- FAIL: TestFollowingTestSuite (0.30s)
    --- FAIL: TestFollowingTestSuite/TestGetFollowing (0.30s)
        following_test.go:48: 
            	Error Trace:	/drone/src/internal/federation/federatingdb/following_test.go:48
            	Error:      	Not equal: 
            	            	expected: "{\"@context\":\"https://www.w3.org/ns/activitystreams\",\"items\":[\"http://localhost:8080/users/admin\",\"http://localhost:8080/users/1happyturtle\"],\"type\":\"Collection\"}"
            	            	actual  : "{\"@context\":\"https://www.w3.org/ns/activitystreams\",\"items\":[\"http://localhost:8080/users/1happyturtle\",\"http://localhost:8080/users/admin\"],\"type\":\"Collection\"}"

This is because the follows in the test rig all had the same created at and updated at, so the order in which they would be selected from the db was not determinate. This fixes that by making the times of test follows 1hr apart.

@tsmethurst tsmethurst merged commit 39d9888 into main Sep 1, 2022
@tsmethurst tsmethurst deleted the test_fixes branch September 1, 2022 11:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant