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

Tests for sync algorithm #974

Merged
merged 7 commits into from
Aug 19, 2024
Merged

Tests for sync algorithm #974

merged 7 commits into from
Aug 19, 2024

Conversation

sunkup
Copy link
Member

@sunkup sunkup commented Aug 13, 2024

Purpose

Tests for the sync algorithm.

Short description

I have tried to have a single test for one specific behaviour only. So the tests are very verbose on purpose.

  • Divides the sync algorithm into small testable methods.
  • Tests these methods lightly (not exhaustively) and with positive tests only. So not really checking the absence of unwanted behaviour (yet).

Checklist

  • The PR has a proper title, description and label.
  • I have self-reviewed the PR.
  • I have added documentation to complex functions and functions that can be used by other modules.
  • I have added reasonable tests or consciously decided to not add tests.

@sunkup sunkup linked an issue Aug 13, 2024 that may be closed by this pull request
@sunkup sunkup added the refactoring Internal improvement of existing functions label Aug 13, 2024
@sunkup sunkup self-assigned this Aug 13, 2024
@sunkup sunkup force-pushed the 950-tests-for-sync-algorithm branch from c452bde to e3afd4a Compare August 13, 2024 13:44
@sunkup sunkup marked this pull request as ready for review August 13, 2024 13:51
@sunkup sunkup requested a review from ArnyminerZ August 13, 2024 13:51
@sunkup
Copy link
Member Author

sunkup commented Aug 13, 2024

Note: @ArnyminerZ tests are failing due to LocalCalendarTest, not the tests in this PR. You can run the tests in this PR locally.

Copy link
Member

@ArnyminerZ ArnyminerZ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, and as you have said, runs correctly locally.

The only thing that bothers me a bit is the getters for TestSyncer

override val authority: String
    get() = ""
override val serviceType: String
    get() = ""

but it doesn't matter, so I guess it can be like that without any issues.

@sunkup sunkup requested a review from rfc2822 August 14, 2024 10:42
Copy link
Member

@rfc2822 rfc2822 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks very good! Have only minor comments :)

sunkup added 2 commits August 19, 2024 10:02
 - update comments
 - update test method spacing
 - replace empty array method
@sunkup sunkup requested a review from rfc2822 August 19, 2024 08:16
@rfc2822 rfc2822 merged commit fca7c09 into main-ose Aug 19, 2024
8 checks passed
@rfc2822 rfc2822 deleted the 950-tests-for-sync-algorithm branch August 19, 2024 11:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactoring Internal improvement of existing functions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Tests for sync algorithm
3 participants