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

SDK-343 - Setup task presents both the release and latest snapshot of… #314

Merged
merged 2 commits into from
Nov 26, 2024

Conversation

mseaton
Copy link
Member

@mseaton mseaton commented Nov 26, 2024

… the same version as options

see https://openmrs.atlassian.net/browse/SDK-343

@mseaton mseaton requested review from dkayiwa and ibacher November 26, 2024 11:40
List<String> res = helper.getSuggestedVersions(
createTestVersions("1.8.8", "1.8.3", "1.8.10-SNAPSHOT", "1.8.9-alpha"), 1);
assertThat(res, hasItem("1.8.9-alpha"));
assertThat(res, hasItem("1.8.10-SNAPSHOT"));
Copy link
Member Author

Choose a reason for hiding this comment

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

This seems like a bug in the test, which allowed bugs in the code to pass. If asking for suggested versions with a max number of 1, it should return the latest suggested version, and 1.8.10 > 1.8.9

createTestVersions("1.1.2", "1.5.6", "1.5.7-SNAPSHOT" , "1.1.2-alpha", "1.1.0-SNAPSHOT", "1.3.0-SNAPSHOT", "1.3.0", "1.1.0"), 6);
assertThat(res, contains("1.5.7-SNAPSHOT", "1.5.6", "1.3.0", "1.3.0-SNAPSHOT", "1.1.2"));
createTestVersions("1.1.2", "1.5.6", "1.5.7-SNAPSHOT", "1.1.2-alpha", "1.1.0-SNAPSHOT", "1.3.0-SNAPSHOT", "1.3.0", "1.1.0"), 6);
assertThat(res, contains("1.5.7-SNAPSHOT", "1.5.6", "1.3.0", "1.1.2"));
Copy link
Member Author

Choose a reason for hiding this comment

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

Ultimately, this bug in this test was actually the case this ticket was aiming to fix. The suggested versions should not include both a release and a snapshot with the same incremental version. After fixing the code, this test broke, then I fixed the test.

@mseaton mseaton merged commit 9eb6225 into master Nov 26, 2024
2 checks passed
@mseaton mseaton deleted the SDK-343 branch November 26, 2024 15:09
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