Skip to content

Commit 427efd5

Browse files
committed
test: Delete all nodes in ComplexQueryTest for a workaround
1 parent 7f2b456 commit 427efd5

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

tests/Integration/ComplexQueryTest.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,15 @@
2828

2929
final class ComplexQueryTest extends EnvironmentAwareIntegrationTest
3030
{
31+
public function setUp(): void
32+
{
33+
parent::setUp();
34+
// testPathReturnType will sometimes run after TransactionIntegrationTest::testTransactionRunNoConsumeButSaveResult
35+
// in CI, which will leave a node in the database. This will cause the test to fail.
36+
// This is a workaround to make sure the database is empty before running the test.
37+
$this->getSession()->run('MATCH (n) DETACH DELETE n');
38+
}
39+
3140
public function testListParameterHelper(): void
3241
{
3342
$result = $this->getSession()->transaction(static fn (TSX $tsx) => $tsx->run('MATCH (x) WHERE x.slug IN $listOrMap RETURN x', [

0 commit comments

Comments
 (0)