Merge branch '3.3-dev' into 3.4-dev
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index 2a96e6a..57fc98b 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -535,7 +535,7 @@
=== TinkerPop 3.3.11 (Release Date: NOT OFFICIALLY RELEASED YET)
* Added `trustStoreType` such that keystore and truststore can be of different types in the Java driver.
-* Added session support to gremlin-javascript.
+* Added session support to all GLVs: Javascript, .NET and Python.
* Fixed bug in Gremlin Server shutdown if failures occurred during `GraphManager` initialization.
* Modified Gremlin Server to close the session when the channel itself is closed.
* Fixed bug in `Order` where comparisons of `enum` types wouldn't compare with `String` values.
@@ -544,7 +544,6 @@
* Bumped to Jackson 2.9.10.3.
* Remove invalid service descriptors from gremlin-shaded.
* Fixed bug in Python and .NET traversal `clone()` where deep copies of bytecode were not occurring.
-* Added session support to gremlin-python
[[release-3-3-10]]
=== TinkerPop 3.3.10 (Release Date: February 3, 2020)
diff --git a/docs/src/reference/gremlin-variants.asciidoc b/docs/src/reference/gremlin-variants.asciidoc
index 33e6c6f..9a01d6c 100644
--- a/docs/src/reference/gremlin-variants.asciidoc
+++ b/docs/src/reference/gremlin-variants.asciidoc
@@ -733,6 +733,7 @@
|message_serializer |The message serializer implementation.|`gremlin_python.driver.serializer.GraphSONMessageSerializer`
|password |The password to submit on requests that require authentication. |""
|username |The username to submit on requests that require authentication. |""
+|session | A unique string-based identifier (typically a UUID) to enable a <<sessions,session-based connection>>. This is not a valid configuration for `DriverRemoteConnection`. |None
|=========================================================
=== Traversal Strategies
@@ -1161,6 +1162,14 @@
include::../../../gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Docs/Reference/GremlinVariantsTests.cs[tags=submittingScriptsWithAuthentication]
----
+It is also possible to initialize the `Client` to use <<sessions,sessions>>:
+
+[source,csharp]
+----
+var gremlinServer = new GremlinServer("localhost", 8182);
+var client = new GremlinClient(gremlinServer, sessionId: Guid.NewGuid().ToString()))
+----
+
[[gremlin-net-dsl]]
=== Domain Specific Languages
diff --git a/docs/src/upgrade/release-3.3.x.asciidoc b/docs/src/upgrade/release-3.3.x.asciidoc
index 0e9549c..52ee98b 100644
--- a/docs/src/upgrade/release-3.3.x.asciidoc
+++ b/docs/src/upgrade/release-3.3.x.asciidoc
@@ -29,21 +29,22 @@
=== Upgrading for Users
-==== gremlin-python Sessions
-
-The `sessions` feature is enabled in gremlin-python.
-
-[source, python]
-client = Client('ws://localhost:8182/gremlin', 'g', session=str(uuid.uuid4()))
-
-==== gremlin-javascript Sessions
+==== GLV Sessions
While TinkerPop doesn't recommend the use of sessions for most use cases, it does remain a feature that is available
and exposed on the server. As such, providing support in all Gremlin Language Variants for this feature is useful in
ensuring a consistent implementation for all programming languages.
[source,javascript]
-const client = new gremlin.driver.Client('ws://localhost:8182/gremlin', { traversalSource: 'g', 'session': 'unique-string-id' });
+const client = new Client('ws://localhost:8182/gremlin', { traversalSource: 'g', 'session': 'unique-string-id' });
+
+[source, python]
+client = Client('ws://localhost:8182/gremlin', 'g', session=str(uuid.uuid4()))
+
+[source, csharp]
+var gremlinServer = new GremlinServer("localhost", 8182);
+var client = new GremlinClient(gremlinServer, sessionId: Guid.NewGuid().ToString()))
+
==== Deprecate maxWaitForSessionClose
The `maxWaitForSessionClose` setting for the Java driver has been deprecated and in some sense replaced by the
diff --git a/gremlin-javascript/src/main/javascript/gremlin-javascript/test/helper.js b/gremlin-javascript/src/main/javascript/gremlin-javascript/test/helper.js
index 72708c0..fb01b2d 100644
--- a/gremlin-javascript/src/main/javascript/gremlin-javascript/test/helper.js
+++ b/gremlin-javascript/src/main/javascript/gremlin-javascript/test/helper.js
@@ -22,6 +22,7 @@
*/
'use strict';
+const utils = require('../lib/utils');
const DriverRemoteConnection = require('../lib/driver/driver-remote-connection');
const Client = require('../lib/driver/client');
const PlainTextSaslAuthenticator = require('../lib/driver/auth/plain-text-sasl-authenticator');
@@ -48,5 +49,6 @@
};
exports.getSessionClient = function getSessionClient(traversalSource) {
- return new Client(serverUrl, { 'traversalSource': traversalSource, 'session': 'unique-string-id'});
+ const sessionId = utils.getUuid();
+ return new Client(serverUrl, { 'traversalSource': traversalSource, 'session': sessionId.toString() });
};