Skip to content

Commit

Permalink
Skip tests with MATCH queries failing on Neo4j 1
Browse files Browse the repository at this point in the history
Back when Neo4p was updated for Neo4j 4, queries that begin with MATCH were added to some tests. My understanding is that such queries are unsupported on Neo4j 1. This change simply skips the affected tests on Neo4j 1.
  • Loading branch information
johannessen committed Dec 11, 2024
1 parent 3b74519 commit 6b6e6e9
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 3 deletions.
1 change: 1 addition & 0 deletions t/006_query.t
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ is_deeply $q->params, { node_id => 1}, 'params accessor';

SKIP : {
skip 'no local connection to neo4j', $num_live_tests if $not_connected;
skip 'MATCH query requires Neo4j 2 or later', $num_live_tests unless REST::Neo4p->_check_version(2,0,0,0);

ok my $n1 = REST::Neo4p::Node->new({name => 'Fred', role => 'husband'}), 'Fred';
ok my $n2 = REST::Neo4p::Node->new({name => 'Wilma', role => 'wife'}), 'Wilma';
Expand Down
1 change: 1 addition & 0 deletions t/011_neo4p_synopsis.t
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ diag "Test server unavailable (".$not_connected->message.") : tests skipped" if

plan skip_all => neo4j_index_unavailable() if neo4j_index_unavailable();
plan skip_all => 'no local connection to neo4j' if $not_connected;
plan skip_all => 'MATCH query requires Neo4j 2 or later' unless REST::Neo4p->_check_version(2,0,0,0);
plan tests => 13 + 4;

{
Expand Down
1 change: 1 addition & 0 deletions t/id_roundtrip.t
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ diag "Test server unavailable (".$not_connected->message.") : tests skipped" if

SKIP : {
skip 'no local connection to neo4j', 34 if $not_connected;
skip 'MATCH query requires Neo4j 2 or later', 34 unless REST::Neo4p->_check_version(2,0,0,0);

my $n1 = REST::Neo4p::Node->new();
ok $n1, 'new node' and push @cleanup, $n1;
Expand Down
1 change: 1 addition & 0 deletions t/json_utf8.t
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ sub to_hex ($) {

SKIP : {
skip 'no local connection to neo4j', 37 if $not_connected;
skip 'MATCH query requires Neo4j 2 or later', 37 unless REST::Neo4p->_check_version(2,0,0,0);

my %props = (
singlebyte => "\N{U+0025}", # '%' PERCENT SIGN = 0x25
Expand Down
1 change: 1 addition & 0 deletions t/rt_81128.t
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ diag "Test server unavailable (".$not_connected->message.") : tests skipped" if

SKIP : {
skip 'no local connection to neo4j', $num_live_tests if $not_connected;
skip 'MATCH query requires Neo4j 2 or later', $num_live_tests unless REST::Neo4p->_check_version(2,0,0,0);

ok my $n1 = REST::Neo4p::Node->new( {name => 'ricky'} ), 'new node 1';
push @cleanup, $n1 if $n1;
Expand Down
6 changes: 3 additions & 3 deletions t/rt_91640.t
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ my $not_connected = connect($TEST_SERVER,$user,$pass);
diag "Test server unavailable (".$not_connected->message.") : tests skipped" if $not_connected;


#SKIP : {
# skip "Neo4j server version >= 2.0.0-M02 required, skipping...", $num_live_tests unless REST::Neo4p->_check_version(2,0,0,2);
SKIP : {
skip "Neo4j server version >= 2.0.0-M02 required, skipping...", $num_live_tests unless REST::Neo4p->_check_version(2,0,0,2);

my $neo4p = 'REST::Neo4p';
my ($n, $m, $t);
Expand Down Expand Up @@ -80,9 +80,9 @@ STMT1
is $$r[0]->get_property('utf8'), 'Сохранить', 'cyrillic property value retrieved correctly';

}
#}

END {

eval { $t && $t->delete_sample; };
}
}

0 comments on commit 6b6e6e9

Please sign in to comment.