Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@

namespace Gremlin.Net.IntegrationTest.Driver
{
/// <summary>
/// Serialized with Gherkin tests to avoid reading vertices through an active GraphComputerView
/// when @GraphComputerOnly scenarios run concurrently, which would expose transient compute properties.
/// </summary>
[Collection("GremlinServerTests")]
public class PropertyDeserializationTests
{
private readonly RemoteConnectionFactory _connectionFactory = new();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@

namespace Gremlin.Net.IntegrationTest.Gherkin
{
[CollectionDefinition(nameof(GherkinTestDefinition), DisableParallelization = true)]
public class GherkinTestDefinition { }
[CollectionDefinition(nameof(GremlinServerTests), DisableParallelization = true)]
public class GremlinServerTests { }

[Collection(nameof(GherkinTestDefinition))]
[Collection(nameof(GremlinServerTests))]
public class GherkinTestRunner
{
private static readonly IDictionary<string, IgnoreReason> IgnoredScenarios =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@

namespace Gremlin.Net.IntegrationTest.Process.Traversal.DriverRemoteConnection
{
[Collection("GremlinServerTests")]
public class GraphTraversalTests
{
private readonly RemoteConnectionFactory _connectionFactory = new RemoteConnectionFactory();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ public Settings overrideSettings(final Settings settings) {
settings.transactionTimeout = 1000;
break;
case "shouldTimeoutIdleTransactionWithNoOperations":
settings.transactionTimeout = 1;
settings.transactionTimeout = 500;
break;
case "shouldTimeoutAndRejectLateCommit":
case "shouldTrackTransactionCountAccurately":
Expand Down Expand Up @@ -333,7 +333,7 @@ public void shouldRejectEmptyTransactionId() throws Exception {
public void shouldTimeoutIdleTransactionWithNoOperations() throws Exception {
final String txId = beginTx(client, GTX);

// wait for the transaction to timeout (configured at 1ms)
// wait for the transaction to timeout (configured at 500ms)
Thread.sleep(1000);

// the transaction should be gone
Expand Down Expand Up @@ -382,12 +382,16 @@ public void shouldTrackTransactionCountAccurately() throws Exception {

assertEquals(3, txManager.getActiveTransactionCount());

// commit one
commitTx(client, txId1, GTX);
// commit one - must close response to ensure server-side processing completes
try (final CloseableHttpResponse r = commitTx(client, txId1, GTX)) {
assertEquals(200, r.getStatusLine().getStatusCode());
}
assertEquals(2, txManager.getActiveTransactionCount());

// rollback one
rollbackTx(client, txId2, GTX);
try (final CloseableHttpResponse r = rollbackTx(client, txId2, GTX)) {
assertEquals(200, r.getStatusLine().getStatusCode());
}
assertEquals(1, txManager.getActiveTransactionCount());

// let the third one timeout
Expand Down
Loading