Skip to content

Commit 6219574

Browse files
authored
Updating graph tests to support new execution plan (#2486)
1 parent 6fa6cfc commit 6219574

File tree

3 files changed

+11
-19
lines changed

3 files changed

+11
-19
lines changed

tests/test_asyncio/test_graph.py

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -406,7 +406,7 @@ async def test_execution_plan(modclient: redis.Redis):
406406
"MATCH (r:Rider)-[:rides]->(t:Team) WHERE t.name = $name RETURN r.name, t.name, $params", # noqa
407407
{"name": "Yehuda"},
408408
)
409-
expected = "Results\n Project\n Conditional Traverse | (t:Team)->(r:Rider)\n Filter\n Node By Label Scan | (t:Team)" # noqa
409+
expected = "Results\n Project\n Conditional Traverse | (t)->(r:Rider)\n Filter\n Node By Label Scan | (t:Team)" # noqa
410410
assert result == expected
411411

412412
await redis_graph.delete()
@@ -437,11 +437,11 @@ async def test_explain(modclient: redis.Redis):
437437
Distinct
438438
Join
439439
Project
440-
Conditional Traverse | (t:Team)->(r:Rider)
440+
Conditional Traverse | (t)->(r:Rider)
441441
Filter
442442
Node By Label Scan | (t:Team)
443443
Project
444-
Conditional Traverse | (t:Team)->(r:Rider)
444+
Conditional Traverse | (t)->(r:Rider)
445445
Filter
446446
Node By Label Scan | (t:Team)"""
447447
assert str(result).replace(" ", "").replace("\n", "") == expected.replace(
@@ -453,9 +453,7 @@ async def test_explain(modclient: redis.Redis):
453453
Operation("Join")
454454
.append_child(
455455
Operation("Project").append_child(
456-
Operation(
457-
"Conditional Traverse", "(t:Team)->(r:Rider)"
458-
).append_child(
456+
Operation("Conditional Traverse", "(t)->(r:Rider)").append_child(
459457
Operation("Filter").append_child(
460458
Operation("Node By Label Scan", "(t:Team)")
461459
)
@@ -464,9 +462,7 @@ async def test_explain(modclient: redis.Redis):
464462
)
465463
.append_child(
466464
Operation("Project").append_child(
467-
Operation(
468-
"Conditional Traverse", "(t:Team)->(r:Rider)"
469-
).append_child(
465+
Operation("Conditional Traverse", "(t)->(r:Rider)").append_child(
470466
Operation("Filter").append_child(
471467
Operation("Node By Label Scan", "(t:Team)")
472468
)

tests/test_graph.py

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -497,7 +497,7 @@ def test_execution_plan(client):
497497
"MATCH (r:Rider)-[:rides]->(t:Team) WHERE t.name = $name RETURN r.name, t.name, $params", # noqa
498498
{"name": "Yehuda"},
499499
)
500-
expected = "Results\n Project\n Conditional Traverse | (t:Team)->(r:Rider)\n Filter\n Node By Label Scan | (t:Team)" # noqa
500+
expected = "Results\n Project\n Conditional Traverse | (t)->(r:Rider)\n Filter\n Node By Label Scan | (t:Team)" # noqa
501501
assert result == expected
502502

503503
redis_graph.delete()
@@ -528,11 +528,11 @@ def test_explain(client):
528528
Distinct
529529
Join
530530
Project
531-
Conditional Traverse | (t:Team)->(r:Rider)
531+
Conditional Traverse | (t)->(r:Rider)
532532
Filter
533533
Node By Label Scan | (t:Team)
534534
Project
535-
Conditional Traverse | (t:Team)->(r:Rider)
535+
Conditional Traverse | (t)->(r:Rider)
536536
Filter
537537
Node By Label Scan | (t:Team)"""
538538
assert str(result).replace(" ", "").replace("\n", "") == expected.replace(
@@ -544,9 +544,7 @@ def test_explain(client):
544544
Operation("Join")
545545
.append_child(
546546
Operation("Project").append_child(
547-
Operation(
548-
"Conditional Traverse", "(t:Team)->(r:Rider)"
549-
).append_child(
547+
Operation("Conditional Traverse", "(t)->(r:Rider)").append_child(
550548
Operation("Filter").append_child(
551549
Operation("Node By Label Scan", "(t:Team)")
552550
)
@@ -555,9 +553,7 @@ def test_explain(client):
555553
)
556554
.append_child(
557555
Operation("Project").append_child(
558-
Operation(
559-
"Conditional Traverse", "(t:Team)->(r:Rider)"
560-
).append_child(
556+
Operation("Conditional Traverse", "(t)->(r:Rider)").append_child(
561557
Operation("Filter").append_child(
562558
Operation("Node By Label Scan", "(t:Team)")
563559
)

tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ volumes =
9494

9595
[docker:redismod]
9696
name = redismod
97-
image = redis/redis-stack-server:latest
97+
image = redislabs/redismod:edge
9898
ports =
9999
36379:6379/tcp
100100
healtcheck_cmd = python -c "import socket;print(True) if 0 == socket.socket(socket.AF_INET, socket.SOCK_STREAM).connect_ex(('127.0.0.1',36379)) else False"

0 commit comments

Comments
 (0)