Skip to content

Commit 890209f

Browse files
committed
Merge branch '3.8-dev'
# Conflicts: # gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/Gremlin.cs
2 parents 544d344 + 8b45a6f commit 890209f

6 files changed

Lines changed: 289 additions & 290 deletions

File tree

gremlin-dotnet/Examples/BasicGremlin/BasicGremlin.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ static async Task Main()
3131
{
3232
var server = new GremlinServer(ServerHost, ServerPort);
3333
using var remoteConnection = new DriverRemoteConnection(new GremlinClient(server), "g");
34-
var g = Traversal().WithRemote(remoteConnection);
34+
var g = Traversal().With(remoteConnection);
3535

3636
// Basic Gremlin: adding and retrieving data
3737
var v1 = g.AddV(VertexLabel).Property("name", "marko").Next();

gremlin-dotnet/Examples/Connections/Connections.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,17 +30,17 @@ public class ConnectionExample
3030

3131
static void Main()
3232
{
33-
WithRemote();
33+
WithRemoteConnection();
3434
WithConf();
3535
WithSerializer();
3636
}
3737

3838
// Connecting to the server
39-
static void WithRemote()
39+
static void WithRemoteConnection()
4040
{
4141
var server = new GremlinServer(ServerHost, ServerPort);
4242
using var remoteConnection = new DriverRemoteConnection(new GremlinClient(server), "g");
43-
var g = Traversal().WithRemote(remoteConnection);
43+
var g = Traversal().With(remoteConnection);
4444

4545
// Simple query to verify connection
4646
var v = g.AddV(VertexLabel).Iterate();
@@ -53,7 +53,7 @@ static void WithConf()
5353
{
5454
using var remoteConnection = new DriverRemoteConnection(new GremlinClient(
5555
new GremlinServer(hostname: ServerHost, port: ServerPort, enableSsl: false, username: "", password: "")), "g");
56-
var g = Traversal().WithRemote(remoteConnection);
56+
var g = Traversal().With(remoteConnection);
5757

5858
var v = g.AddV(VertexLabel).Iterate();
5959
var count = g.V().HasLabel(VertexLabel).Count().Next();
@@ -66,7 +66,7 @@ static void WithSerializer()
6666
var server = new GremlinServer(ServerHost, ServerPort);
6767
var client = new GremlinClient(server, new GraphSON3MessageSerializer());
6868
using var remoteConnection = new DriverRemoteConnection(client, "g");
69-
var g = Traversal().WithRemote(remoteConnection);
69+
var g = Traversal().With(remoteConnection);
7070

7171
var v = g.AddV(VertexLabel).Iterate();
7272
var count = g.V().HasLabel(VertexLabel).Count().Next();

gremlin-dotnet/Examples/ModernTraversals/ModernTraversals.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ static void Main()
3636
// Use gmodern in CI environment, default connection locally
3737
var traversalSource = IsDocker ? "gmodern" : "g";
3838
using var remoteConnection = new DriverRemoteConnection(new GremlinClient(server), traversalSource);
39-
var g = Traversal().WithRemote(remoteConnection);
39+
var g = Traversal().With(remoteConnection);
4040

4141
/*
4242
This example requires the Modern toy graph to be preloaded upon launching the Gremlin server.

gremlin-dotnet/build/generate.groovy

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -114,13 +114,13 @@ radishGremlinFile.withWriter('UTF-8') { Writer writer ->
114114
writer.write("(g,p) =>")
115115
writer.write(t.getTranslated().
116116
replaceAll("xx([0-9]+)", "p[\"xx\$1\"]").
117-
replaceAll("v([0-9]+)", "(Vertex) p[\"v\$1\"]").
117+
replaceAll("(?<![\\w\\-])v([0-9]+)(?![\\w\\.])", "(Vertex) p[\"v\$1\"]").
118118
replaceAll("vid([0-9]+)", "p[\"vid\$1\"]").
119-
replaceAll("e([0-9]+)", "p[\"e\$1\"]").
119+
replaceAll("(?<![\\w\\-])e([0-9]+)(?![\\w\\.])", "p[\"e\$1\"]").
120120
replaceAll("eid([0-9]+)", "p[\"eid\$1\"]").
121-
replaceAll("l([0-9]+)", "(IFunction) p[\"l\$1\"]").
121+
replaceAll("(?<![\\w\\-])l([0-9]+)(?![\\w\\.])", "(IFunction) p[\"l\$1\"]").
122122
replaceAll("pred([0-9]+)", "(IPredicate) p[\"pred\$1\"]").
123-
replaceAll("c([0-9]+)", "(IComparator) p[\"c\$1\"]"))
123+
replaceAll("(?<![\\w\\-])c([0-9]+)(?![\\w\\.])", "(IComparator) p[\"c\$1\"]"))
124124
if (gremlinItty.hasNext())
125125
writer.write(', ')
126126
else

gremlin-dotnet/docker-compose.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,11 @@ services:
5858
- VERTEX_LABEL=dotnet-example
5959
working_dir: /gremlin-dotnet
6060
command: >
61-
bash -c "dotnet tool update -g dotnet-trx; dotnet test ./Gremlin.Net.sln -c Release --logger trx; /root/.dotnet/tools/trx;
61+
bash -c "find . -path '*/TestResults/*.trx' -delete 2>/dev/null || true;
62+
dotnet tool update -g dotnet-trx; dotnet test ./Gremlin.Net.sln -c Release --logger trx;
6263
EXIT_CODE=$$?;
64+
/root/.dotnet/tools/trx || true;
65+
if [ $$EXIT_CODE -ne 0 ]; then echo '❌ dotnet test FAILED (exit code '$$EXIT_CODE') — build or test errors above'; fi;
6366
echo 'Running examples...';
6467
dotnet run --project Examples/BasicGremlin/BasicGremlin.csproj;
6568
dotnet run --project Examples/Connections/Connections.csproj;

0 commit comments

Comments
 (0)