File tree Expand file tree Collapse file tree 1 file changed +48
-0
lines changed
driver/src/test/java/org/neo4j/driver/v1/integration Expand file tree Collapse file tree 1 file changed +48
-0
lines changed Original file line number Diff line number Diff line change 1+ package org .neo4j .driver .v1 .integration ;
2+
3+ import org .junit .Before ;
4+ import org .junit .Rule ;
5+ import org .junit .Test ;
6+ import org .junit .rules .ExpectedException ;
7+
8+ import org .neo4j .driver .v1 .Transaction ;
9+ import org .neo4j .driver .v1 .util .ServerVersion ;
10+ import org .neo4j .driver .v1 .util .TestNeo4jSession ;
11+
12+ import static org .junit .Assert .assertNotNull ;
13+ import static org .junit .Assert .assertNull ;
14+ import static org .junit .Assume .assumeTrue ;
15+
16+ import static org .neo4j .driver .v1 .util .ServerVersion .v3_1_0 ;
17+
18+ public class BookmarkIT
19+ {
20+ @ Rule
21+ public ExpectedException exception = ExpectedException .none ();
22+ @ Rule
23+ public TestNeo4jSession session = new TestNeo4jSession ();
24+
25+ @ Before
26+ public void assumeBookmarkSupport ()
27+ {
28+ System .out .println (session .server ());
29+ assumeTrue ( ServerVersion .version ( session .server () ).greaterThanOrEqual ( v3_1_0 ) );
30+ }
31+
32+ @ Test
33+ public void shouldReceiveBookmarkOnSuccessfulCommit () throws Throwable
34+ {
35+ // Given
36+ assertNull ( session .lastBookmark () );
37+
38+ // When
39+ try ( Transaction tx = session .beginTransaction () )
40+ {
41+ tx .run ( "CREATE (a:Person)" );
42+ tx .success ();
43+ }
44+
45+ // Then
46+ assertNotNull ( session .lastBookmark () );
47+ }
48+ }
You can’t perform that action at this time.
0 commit comments