Skip to content

Conversation

@ppkarwasz
Copy link
Contributor

This PR migrates the MongoDB tests:

  • from the legacy Flapdoodle Embedded MongoDB 3.x version to the supported 4.x series,
  • from JUnit 4 to JUnit 5.

Closes #1589

@ppkarwasz ppkarwasz requested a review from garydgregory July 21, 2023 17:34
@ppkarwasz ppkarwasz added the tests Pull requests or issues related to tests label Jul 21, 2023
@ppkarwasz ppkarwasz added this to the 2.20.1 milestone Jul 21, 2023
Comment on lines +99 to +120
.packageOfDistribution(new PackageOfCommandDistribution() {

@Override
protected Package packageOf(Command command, Distribution distribution,
DistributionBaseUrl baseUrl) {
if (distribution.platform().operatingSystem().type() == OSType.Windows) {
final Package relativePackage = legacyPackageResolverFactory().apply(command)
.packageFor(distribution);
final FileSet.Builder fileSetBuilder = FileSet.builder()
.addEntry(FileType.Library, "ssleay32.dll")
.addEntry(FileType.Library, "libeay32.dll");
relativePackage.fileSet().entries().forEach(fileSetBuilder::addEntries);
return Package.builder()
.archiveType(relativePackage.archiveType())
.fileSet(fileSetBuilder.build())
.url(baseUrl.value() + relativePackage.url())
.hint(relativePackage.hint())
.build();
}
return super.packageOf(command, distribution, baseUrl);
}
})
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Due to flapdoodle-oss/de.flapdoodle.embed.mongo#309 the Windows tests require a workaround.

@ppkarwasz ppkarwasz merged commit da50994 into apache:2.x Jul 24, 2023
@ppkarwasz ppkarwasz deleted the embed-mongo branch August 17, 2023 18:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tests Pull requests or issues related to tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Modernize MongoDB tests

1 participant