Search in sources :

Example 1 with TestCommandListener

use of com.mongodb.connection.TestCommandListener in project mongo-java-driver by mongodb.

the class CommandMonitoringTest method beforeClass.

@BeforeClass
public static void beforeClass() {
    commandListener = new TestCommandListener();
    mongoClient = new MongoClient(getMongoClientURI(MongoClientOptions.builder().addCommandListener(commandListener)));
}
Also used : MongoClient(com.mongodb.MongoClient) TestCommandListener(com.mongodb.connection.TestCommandListener) BeforeClass(org.junit.BeforeClass)

Aggregations

MongoClient (com.mongodb.MongoClient)1 TestCommandListener (com.mongodb.connection.TestCommandListener)1 BeforeClass (org.junit.BeforeClass)1