Skip to content
Commits on Source (7)
......@@ -364,8 +364,6 @@ tasks:
depends_on:
- variant: ".tests-variant"
name: "test"
- variant: ".test-gssapi-variant"
name: "gssapi-auth-test"
- variant: "plain-auth-test"
name: "plain-auth-test"
commands:
......@@ -512,13 +510,6 @@ buildvariants:
tasks:
- name: "test"
- matrix_name: "test-gssapi"
matrix_spec: { jdk: "*", os: "linux" }
display_name: "GSSAPI (Kerberos) Auth test ${jdk} ${os} "
tags: ["test-gssapi-variant"]
tasks:
- name: "gssapi-auth-test"
- name: plain-auth-test
display_name: "PLAIN (LDAP) Auth test"
run_on: *hosts
......
......@@ -50,7 +50,7 @@ configure(subprojects.findAll { it.name != 'util' }) {
evaluationDependsOn(':util')
group = 'org.mongodb'
version = '3.6.2'
version = '3.6.3'
sourceCompatibility = JavaVersion.VERSION_1_6
targetCompatibility = JavaVersion.VERSION_1_6
......
mongo-java-driver (3.6.3-1) unstable; urgency=medium
* Team upload.
* New upstream version 3.6.3.
* Declare compliance with Debian Policy 4.1.4.
* Fix FTBFS with Java 10 because com.sun.tools.doclet does not exist anymore.
(Closes: #897458)
-- Markus Koschany <apo@debian.org> Fri, 04 May 2018 19:53:36 +0200
mongo-java-driver (3.6.2-1) unstable; urgency=medium
* Team upload.
......
......@@ -16,7 +16,7 @@ Build-Depends:
libspock-java,
maven-repo-helper,
mongodb-server
Standards-Version: 4.1.3
Standards-Version: 4.1.4
Vcs-Git: https://anonscm.debian.org/git/pkg-java/mongo-java-driver.git
Vcs-Browser: https://anonscm.debian.org/cgit/pkg-java/mongo-java-driver.git
Homepage: http://www.mongodb.org
......
......@@ -132,11 +132,6 @@ Copyright: 2008-2014, Atlassian Pty Ltd
2008-2015, MongoDB, Inc.
License: Apache-2.0
Files: driver-core/src/main/com/mongodb/connection/Base64Codec.java
Copyright: 1999-2005, The Apache Software Foundation.
2008-2014, MongoDB, Inc.
License: Apache-2.0
Files: driver-core/src/main/com/mongodb/connection/netty/ReadTimeoutHandler.java
Copyright: 2012, The Netty Project
2015, MongoDB, Inc.
......
From: Markus Koschany <apo@debian.org>
Date: Fri, 4 May 2018 21:25:19 +0200
Subject: java10
com.sun.tools.doclets is gone.
---
util/src/main/DocTaglet.java | 82 ----------------------------------
util/src/main/DochubTaglet.java | 42 -----------------
util/src/main/ManualTaglet.java | 42 -----------------
util/src/main/ServerReleaseTaglet.java | 42 -----------------
4 files changed, 208 deletions(-)
delete mode 100644 util/src/main/DocTaglet.java
delete mode 100644 util/src/main/DochubTaglet.java
delete mode 100644 util/src/main/ManualTaglet.java
delete mode 100644 util/src/main/ServerReleaseTaglet.java
diff --git a/util/src/main/DocTaglet.java b/util/src/main/DocTaglet.java
deleted file mode 100644
index a2ec739..0000000
--- a/util/src/main/DocTaglet.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * Copyright (c) 2008-2014 MongoDB, Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-import com.sun.javadoc.Tag;
-import com.sun.tools.doclets.Taglet;
-
-public abstract class DocTaglet implements Taglet {
-
- public boolean inConstructor() {
- return true;
- }
-
- public boolean inField() {
- return true;
- }
-
- public boolean inMethod() {
- return true;
- }
-
- public boolean inOverview() {
- return true;
- }
-
- public boolean inPackage() {
- return true;
- }
-
- public boolean inType() {
- return true;
- }
-
- public boolean isInlineTag() {
- return false;
- }
-
- public String toString(final Tag[] tags) {
- if (tags.length == 0) {
- return null;
- }
-
- StringBuilder buf = new StringBuilder(String.format("\n<dl><dt><span class=\"strong\">%s</span></dt>\n", getHeader()));
- for (Tag t : tags) {
- buf.append(" <dd>").append(genLink(t.text())).append("</dd>\n");
- }
- return buf.toString();
- }
-
- protected abstract String getHeader();
-
- public String toString(final Tag tag) {
- return toString(new Tag[]{tag});
- }
-
- protected String genLink(final String text) {
- String relativePath = text;
- String display = text;
-
- int firstSpace = text.indexOf(' ');
- if (firstSpace != -1) {
- relativePath = text.substring(0, firstSpace);
- display = text.substring(firstSpace, text.length()).trim();
- }
-
- return String.format("<a href='%s%s'>%s</a>", getBaseDocURI(), relativePath, display);
- }
-
- protected abstract String getBaseDocURI();
-}
diff --git a/util/src/main/DochubTaglet.java b/util/src/main/DochubTaglet.java
deleted file mode 100644
index 06979d7..0000000
--- a/util/src/main/DochubTaglet.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Copyright 2017 MongoDB, Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-import com.sun.tools.doclets.Taglet;
-
-import java.util.Map;
-
-public class DochubTaglet extends DocTaglet {
-
- public static void register(final Map<String, Taglet> tagletMap) {
- DochubTaglet t = new DochubTaglet();
- tagletMap.put(t.getName(), t);
- }
-
- public String getName() {
- return "mongodb.driver.dochub";
- }
-
- @Override
- protected String getHeader() {
- return "MongoDB documentation";
- }
-
- @Override
- protected String getBaseDocURI() {
- return "http://dochub.mongodb.org/";
- }
-
-}
diff --git a/util/src/main/ManualTaglet.java b/util/src/main/ManualTaglet.java
deleted file mode 100644
index 228f0d5..0000000
--- a/util/src/main/ManualTaglet.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Copyright (c) 2008-2014 MongoDB, Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-import com.sun.tools.doclets.Taglet;
-
-import java.util.Map;
-
-public class ManualTaglet extends DocTaglet {
-
- public static void register(final Map<String, Taglet> tagletMap) {
- ManualTaglet t = new ManualTaglet();
- tagletMap.put(t.getName(), t);
- }
-
- public String getName() {
- return "mongodb.driver.manual";
- }
-
- @Override
- protected String getHeader() {
- return "MongoDB documentation";
- }
-
- @Override
- protected String getBaseDocURI() {
- return "http://docs.mongodb.org/manual/";
- }
-
-}
diff --git a/util/src/main/ServerReleaseTaglet.java b/util/src/main/ServerReleaseTaglet.java
deleted file mode 100644
index b6e2bfa..0000000
--- a/util/src/main/ServerReleaseTaglet.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Copyright (c) 2008-2014 MongoDB, Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-import com.sun.tools.doclets.Taglet;
-
-import java.util.Map;
-
-public class ServerReleaseTaglet extends DocTaglet {
-
- public static void register(final Map<String, Taglet> tagletMap) {
- Taglet t = new ServerReleaseTaglet();
- tagletMap.put(t.getName(), t);
- }
-
- @Override
- public String getName() {
- return "mongodb.server.release";
- }
-
- @Override
- protected String getBaseDocURI() {
- return "http://docs.mongodb.org/manual/release-notes/";
- }
-
- @Override
- protected String getHeader() {
- return "Since server release";
- }
-}
build.patch
test.patch
gradle.patch
java10.patch
current = "3.6.2"
current = "3.6.3"
[[versions]]
version = "3.6.2"
version = "3.6.3"
status = "current"
docs = "./3.6"
api = "./3.6/javadoc"
......@@ -49,19 +49,19 @@ current = "3.6.2"
[[drivers]]
name = "mongodb-driver"
description = "The synchronous driver, new in 3.0.<br/>For older versions of the driver or for OSGi-based applications please use the `mongo-java-driver`."
versions = "3.6.2,3.5.0,3.4.3,3.3.0,3.2.2,3.1.1,3.0.4"
versions = "3.6.3,3.5.0,3.4.3,3.3.0,3.2.2,3.1.1,3.0.4"
[[drivers]]
name = "mongo-java-driver"
description = "An uber jar containing the bson library, the core library and the mongodb-driver.<br/>This artifact is a valid OSGi bundle."
versions = "3.6.2,3.5.0,3.4.3,3.3.0,3.2.2,3.1.1,3.0.4,2.14.2,2.13.3"
versions = "3.6.3,3.5.0,3.4.3,3.3.0,3.2.2,3.1.1,3.0.4,2.14.2,2.13.3"
[[drivers]]
name = "mongodb-driver-async"
description = "The new asynchronous driver, new in 3.0"
versions = "3.6.2,3.5.0,3.4.3,3.3.0,3.2.2,3.1.1,3.0.4"
versions = "3.6.3,3.5.0,3.4.3,3.3.0,3.2.2,3.1.1,3.0.4"
[[drivers]]
name = "mongodb-driver-core"
description = "The core library, new in 3.0"
versions = "3.6.2,3.5.0,3.4.3,3.3.0,3.2.2,3.1.1,3.0.4"
versions = "3.6.3,3.5.0,3.4.3,3.3.0,3.2.2,3.1.1,3.0.4"
......@@ -22,4 +22,4 @@ This library comprehensively supports [BSON](http://www.bsonspec.org),
the data storage and network transfer format that MongoDB uses for "documents".
BSON is short for Binary [JSON](http://json.org/), is a binary-encoded serialization of JSON-like documents.
{{< install artifactId="bson" version="3.6.2" >}}
{{< install artifactId="bson" version="3.6.3" >}}
......@@ -23,4 +23,4 @@ The MongoDB Async Driver requires either [Netty](http://netty.io/) or Java 7.
The MongoDB Async Driver provides asynchronous API that can leverage either Netty or Java 7's AsynchronousSocketChannel for fast and non-blocking I/O.
{{< install artifactId="mongodb-driver-async" version="3.6.2" dependencies="true">}}
{{< install artifactId="mongodb-driver-async" version="3.6.3" dependencies="true">}}
......@@ -39,7 +39,9 @@ JMX connection pool monitoring is disabled by default. To enable it add a `com.m
```java
MongoClientSettings settings =
MongoClientSettings.builder()
.applyToConnectionPoolSettings(builder -> builder.addConnectionPoolListener(new JMXConnectionPoolListener()))
.connectionPoolSettings(ConnectionPoolSettings.builder()
.addConnectionPoolListener(new JMXConnectionPoolListener())
.build())
.build();
```
......
......@@ -29,7 +29,7 @@ For OSGi-based applications, use the [mongo-java-driver](#uber-jar-legacy) uber
{{% /note %}}
{{< install artifactId="mongodb-driver" version="3.6.2" dependencies="true">}}
{{< install artifactId="mongodb-driver" version="3.6.3" dependencies="true">}}
## Uber Jar (Legacy)
......@@ -41,4 +41,4 @@ For new applications, the preferred artifact is [mongodb-driver](#mongodb-driver
The `mongo-java-driver` artifact is a valid OSGi bundle.
{{% /note %}}
{{< install artifactId="mongo-java-driver" version="3.6.2">}}
{{< install artifactId="mongo-java-driver" version="3.6.3">}}
......@@ -28,7 +28,7 @@ The configuration of the `MongoClientFactory` differs depending on the applicati
<module xmlns="urn:jboss:module:1.3" name="org.mongodb">
<resources>
<resource-root path="mongo-java-driver-3.6.2.jar"/>
<resource-root path="mongo-java-driver-3.6.3.jar"/>
</resources>
<dependencies>
<module name="javax.api"/>
......
......@@ -161,4 +161,7 @@ class MongoClientImpl implements MongoClient {
return cluster;
}
ServerSessionPool getServerSessionPool() {
return serverSessionPool;
}
}
......@@ -1087,7 +1087,7 @@ class MongoCollectionImpl<TDocument> implements MongoCollection<TDocument> {
@Override
public void renameCollection(final MongoNamespace newCollectionNamespace, final RenameCollectionOptions options,
final SingleResultCallback<Void> callback) {
executeRenameCollection(null, newCollectionNamespace, new RenameCollectionOptions(), callback);
executeRenameCollection(null, newCollectionNamespace, options, callback);
}
@Override
......@@ -1100,7 +1100,7 @@ class MongoCollectionImpl<TDocument> implements MongoCollection<TDocument> {
public void renameCollection(final ClientSession clientSession, final MongoNamespace newCollectionNamespace,
final RenameCollectionOptions options, final SingleResultCallback<Void> callback) {
notNull("clientSession", clientSession);
executeRenameCollection(clientSession, newCollectionNamespace, new RenameCollectionOptions(), callback);
executeRenameCollection(clientSession, newCollectionNamespace, options, callback);
}
private void executeRenameCollection(final ClientSession clientSession, final MongoNamespace newCollectionNamespace,
......
......@@ -27,6 +27,7 @@ import java.util.concurrent.TimeUnit;
import static com.mongodb.async.client.Fixture.drop;
import static com.mongodb.async.client.Fixture.getDefaultDatabaseName;
import static com.mongodb.async.client.Fixture.getMongoClient;
import static com.mongodb.async.client.Fixture.waitForLastServerSessionPoolRelease;
public class DatabaseTestCase {
//For ease of use and readability, in this specific case we'll allow protected variables
......@@ -49,6 +50,8 @@ public class DatabaseTestCase {
if (collection != null) {
drop(collection.getNamespace());
}
waitForLastServerSessionPoolRelease();
}
public abstract class MongoOperation<TResult> {
......
......@@ -16,9 +16,12 @@
package com.mongodb.async.client;
import com.mongodb.ClusterFixture;
import com.mongodb.ConnectionString;
import com.mongodb.MongoCommandException;
import com.mongodb.MongoInterruptedException;
import com.mongodb.MongoNamespace;
import com.mongodb.MongoTimeoutException;
import com.mongodb.async.FutureResultCallback;
import com.mongodb.connection.ClusterSettings;
import com.mongodb.connection.ConnectionPoolSettings;
......@@ -28,6 +31,7 @@ import com.mongodb.connection.SslSettings;
import org.bson.Document;
import static com.mongodb.connection.ClusterType.SHARDED;
import static java.lang.Thread.sleep;
import static java.util.concurrent.TimeUnit.SECONDS;
/**
......@@ -152,6 +156,29 @@ public final class Fixture {
}
}
public static synchronized void waitForLastServerSessionPoolRelease() {
if (mongoClient != null) {
long startTime = System.currentTimeMillis();
int sessionInUseCount = getSessionInUseCount();
while (sessionInUseCount > 0) {
try {
if (System.currentTimeMillis() > startTime + ClusterFixture.TIMEOUT * 1000) {
throw new MongoTimeoutException("Timed out waiting for server session pool in use count to drop to 0. Now at: "
+ sessionInUseCount);
}
sleep(10);
sessionInUseCount = getSessionInUseCount();
} catch (InterruptedException e) {
throw new MongoInterruptedException("Interrupted", e);
}
}
}
}
private static int getSessionInUseCount() {
return mongoClient.getServerSessionPool().getInUseCount();
}
static class ShutdownHook extends Thread {
@Override
public void run() {
......
......@@ -22,6 +22,7 @@ import spock.lang.Specification
import static Fixture.getDefaultDatabase
import static Fixture.initializeCollection
import static com.mongodb.async.client.Fixture.waitForLastServerSessionPoolRelease
class FunctionalSpecification extends Specification {
protected MongoDatabase database;
......@@ -32,6 +33,10 @@ class FunctionalSpecification extends Specification {
collection = initializeCollection(new MongoNamespace(database.getName(), getClass().getName()))
}
def cleanup() {
waitForLastServerSessionPoolRelease();
}
String getDatabaseName() {
database.getName();
}
......
......@@ -74,6 +74,9 @@ class MongoClientSessionSpecification extends FunctionalSpecification {
clientSession.getClusterTime() == null
clientSession.getOperationTime() == null
clientSession.getServerSession() != null
cleanup:
clientSession.close()
}
@IgnoreIf({ !serverVersionAtLeast(3, 6) })
......@@ -115,6 +118,9 @@ class MongoClientSessionSpecification extends FunctionalSpecification {
then:
clientSession.getClusterTime() == secondClusterTime
cleanup:
clientSession.close()
}
@IgnoreIf({ !serverVersionAtLeast(3, 6) })
......@@ -153,6 +159,9 @@ class MongoClientSessionSpecification extends FunctionalSpecification {
then:
clientSession.getOperationTime() == secondOperationTime
cleanup:
clientSession.close()
}
@IgnoreIf({ !serverVersionAtLeast(3, 6) })
......@@ -179,6 +188,9 @@ class MongoClientSessionSpecification extends FunctionalSpecification {
then:
thrown(IllegalStateException)
cleanup:
clientSession.close()
}
@IgnoreIf({ !serverVersionAtLeast(3, 6) })
......@@ -207,6 +219,9 @@ class MongoClientSessionSpecification extends FunctionalSpecification {
clientSession != null
clientSession.isCausallyConsistent() == causallyConsistent
cleanup:
clientSession.close()
where:
causallyConsistent << [true, false]
}
......@@ -225,6 +240,9 @@ class MongoClientSessionSpecification extends FunctionalSpecification {
identifier.get('id').isBinary()
identifier.getBinary('id').getType() == BsonBinarySubType.UUID_STANDARD.value
identifier.getBinary('id').data.length == 16
cleanup:
clientSession.close()
}
@IgnoreIf({ !serverVersionAtLeast(3, 6) })
......
......@@ -114,6 +114,7 @@ class SmokeTestSpecification extends FunctionalSpecification {
then:
batchCursor.getBatchSize() == 0
batchCursor.close()
when: 'The collection name should be in the collections list'
def collectionNames = run(database.listCollections().&into, [])
......