Skip to content

Commit

Permalink
Add warning to MongoServerExtension Javadocs
Browse files Browse the repository at this point in the history
Add a warning to the Javadocs that MongoServerExtension will not
work with Mongo Java driver 5.2.0 or higher because that version
requires wire version 7. At present, mongo-java-server only
supports wire version 6.

Closes #524
  • Loading branch information
sleberknight committed Oct 16, 2024
1 parent e833783 commit dbb2d04
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@
import java.util.concurrent.ThreadLocalRandom;

/**
* <strong>WARNING:</strong> <em>As of kiwi-test 3.7.0, this extension will fail when using Mongo
* driver version 5.2.0 or higher, as it requires minimum Mongo server 4.0 and wire version 7.
* It will not work unless the <a href="https://github.com/bwaldvogel/mongo-java-server">mongo-java-server</a>
* library fixes <a href="https://github.com/bwaldvogel/mongo-java-server/issues/233">this issue</a>
* and creates a new release that supports wire version 7.</em>
* <p>
* A JUnit Jupiter {@link org.junit.jupiter.api.extension.Extension Extension} that starts an in-memory
* {@link MongoServer} once before all tests have run, and which shuts it down once after all tests have run.
* An alternative for testing against "real" MongoDB instances is the {@link MongoDbExtension}.
Expand Down Expand Up @@ -59,6 +65,7 @@
@Slf4j
public class MongoServerExtension implements BeforeAllCallback, AfterAllCallback, AfterEachCallback {

// private static final ServerVersion DEFAULT_SERVER_VERSION = ServerVersion.MONGO_3_6;
private static final ServerVersion DEFAULT_SERVER_VERSION = ServerVersion.MONGO_3_6;

/**
Expand Down

0 comments on commit dbb2d04

Please sign in to comment.