37
37
import org .neo4j .driver .internal .async .inbound .InboundMessageDispatcher ;
38
38
import org .neo4j .driver .internal .async .outbound .OutboundMessageHandler ;
39
39
import org .neo4j .driver .internal .messaging .v1 .MessageFormatV1 ;
40
+ <<<<<<< HEAD
40
41
import org .neo4j .driver .internal .util .ServerVersion ;
42
+ =======
43
+ >>>>>>> parent of 31d 3495 a ... Since Server v4 .0 the server agent received in response to the Hello message is unreliable . Instead , since the server and Bolt protocol versions are aligned , we use the protocol version instead for all connections to Server 4.0 and higher (#708 ) (#718 )
41
44
42
45
import static org .junit .jupiter .api .Assertions .assertEquals ;
43
46
import static org .junit .jupiter .api .Assertions .assertFalse ;
@@ -74,7 +77,11 @@ void tearDown()
74
77
void shouldSetServerVersionOnChannel ()
75
78
{
76
79
ChannelPromise channelPromise = channel .newPromise ();
80
+ <<<<<<< HEAD
77
81
HelloResponseHandler handler = new HelloResponseHandler ( channelPromise , 3 );
82
+ =======
83
+ HelloResponseHandler handler = new HelloResponseHandler ( channelPromise );
84
+ >>>>>>> parent of 31d 3495 a ... Since Server v4 .0 the server agent received in response to the Hello message is unreliable . Instead , since the server and Bolt protocol versions are aligned , we use the protocol version instead for all connections to Server 4.0 and higher (#708 ) (#718 )
78
85
79
86
Map <String ,Value > metadata = metadata ( anyServerVersion (), "bolt-1" );
80
87
handler .onSuccess ( metadata );
@@ -87,7 +94,11 @@ void shouldSetServerVersionOnChannel()
87
94
void shouldThrowWhenServerVersionNotReturned ()
88
95
{
89
96
ChannelPromise channelPromise = channel .newPromise ();
97
+ <<<<<<< HEAD
90
98
HelloResponseHandler handler = new HelloResponseHandler ( channelPromise , 3 );
99
+ =======
100
+ HelloResponseHandler handler = new HelloResponseHandler ( channelPromise );
101
+ >>>>>>> parent of 31d 3495 a ... Since Server v4 .0 the server agent received in response to the Hello message is unreliable . Instead , since the server and Bolt protocol versions are aligned , we use the protocol version instead for all connections to Server 4.0 and higher (#708 ) (#718 )
91
102
92
103
Map <String ,Value > metadata = metadata ( null , "bolt-1" );
93
104
assertThrows ( UntrustedServerException .class , () -> handler .onSuccess ( metadata ) );
@@ -100,7 +111,11 @@ void shouldThrowWhenServerVersionNotReturned()
100
111
void shouldThrowWhenServerVersionIsNull ()
101
112
{
102
113
ChannelPromise channelPromise = channel .newPromise ();
114
+ <<<<<<< HEAD
103
115
HelloResponseHandler handler = new HelloResponseHandler ( channelPromise , 3 );
116
+ =======
117
+ HelloResponseHandler handler = new HelloResponseHandler ( channelPromise );
118
+ >>>>>>> parent of 31d 3495 a ... Since Server v4 .0 the server agent received in response to the Hello message is unreliable . Instead , since the server and Bolt protocol versions are aligned , we use the protocol version instead for all connections to Server 4.0 and higher (#708 ) (#718 )
104
119
105
120
Map <String ,Value > metadata = metadata ( Values .NULL , "bolt-x" );
106
121
assertThrows ( UntrustedServerException .class , () -> handler .onSuccess ( metadata ) );
@@ -113,7 +128,11 @@ void shouldThrowWhenServerVersionIsNull()
113
128
void shouldThrowWhenServerVersionCantBeParsed ()
114
129
{
115
130
ChannelPromise channelPromise = channel .newPromise ();
131
+ <<<<<<< HEAD
116
132
HelloResponseHandler handler = new HelloResponseHandler ( channelPromise , 3 );
133
+ =======
134
+ HelloResponseHandler handler = new HelloResponseHandler ( channelPromise );
135
+ >>>>>>> parent of 31d 3495 a ... Since Server v4 .0 the server agent received in response to the Hello message is unreliable . Instead , since the server and Bolt protocol versions are aligned , we use the protocol version instead for all connections to Server 4.0 and higher (#708 ) (#718 )
117
136
118
137
Map <String ,Value > metadata = metadata ( "WrongServerVersion" , "bolt-x" );
119
138
assertThrows ( IllegalArgumentException .class , () -> handler .onSuccess ( metadata ) );
@@ -123,6 +142,7 @@ void shouldThrowWhenServerVersionCantBeParsed()
123
142
}
124
143
125
144
@ Test
145
+ <<<<<<< HEAD
126
146
void shouldUseProtocolVersionForServerVersionWhenConnectedWithBoltV4 ()
127
147
{
128
148
ChannelPromise channelPromise = channel .newPromise ();
@@ -141,6 +161,12 @@ void shouldSetConnectionIdOnChannel()
141
161
{
142
162
ChannelPromise channelPromise = channel .newPromise ();
143
163
HelloResponseHandler handler = new HelloResponseHandler ( channelPromise , 3 );
164
+ =======
165
+ void shouldSetConnectionIdOnChannel ()
166
+ {
167
+ ChannelPromise channelPromise = channel .newPromise ();
168
+ HelloResponseHandler handler = new HelloResponseHandler ( channelPromise );
169
+ >>>>>>> parent of 31d 3495 a ... Since Server v4 .0 the server agent received in response to the Hello message is unreliable . Instead , since the server and Bolt protocol versions are aligned , we use the protocol version instead for all connections to Server 4.0 and higher (#708 ) (#718 )
144
170
145
171
Map <String ,Value > metadata = metadata ( anyServerVersion (), "bolt-42" );
146
172
handler .onSuccess ( metadata );
@@ -153,7 +179,11 @@ void shouldSetConnectionIdOnChannel()
153
179
void shouldThrowWhenConnectionIdNotReturned ()
154
180
{
155
181
ChannelPromise channelPromise = channel .newPromise ();
182
+ <<<<<<< HEAD
156
183
HelloResponseHandler handler = new HelloResponseHandler ( channelPromise , 3 );
184
+ =======
185
+ HelloResponseHandler handler = new HelloResponseHandler ( channelPromise );
186
+ >>>>>>> parent of 31d 3495 a ... Since Server v4 .0 the server agent received in response to the Hello message is unreliable . Instead , since the server and Bolt protocol versions are aligned , we use the protocol version instead for all connections to Server 4.0 and higher (#708 ) (#718 )
157
187
158
188
Map <String ,Value > metadata = metadata ( anyServerVersion (), null );
159
189
assertThrows ( IllegalStateException .class , () -> handler .onSuccess ( metadata ) );
@@ -166,7 +196,11 @@ void shouldThrowWhenConnectionIdNotReturned()
166
196
void shouldThrowWhenConnectionIdIsNull ()
167
197
{
168
198
ChannelPromise channelPromise = channel .newPromise ();
199
+ <<<<<<< HEAD
169
200
HelloResponseHandler handler = new HelloResponseHandler ( channelPromise , 3 );
201
+ =======
202
+ HelloResponseHandler handler = new HelloResponseHandler ( channelPromise );
203
+ >>>>>>> parent of 31d 3495 a ... Since Server v4 .0 the server agent received in response to the Hello message is unreliable . Instead , since the server and Bolt protocol versions are aligned , we use the protocol version instead for all connections to Server 4.0 and higher (#708 ) (#718 )
170
204
171
205
Map <String ,Value > metadata = metadata ( anyServerVersion (), Values .NULL );
172
206
assertThrows ( IllegalStateException .class , () -> handler .onSuccess ( metadata ) );
@@ -179,7 +213,11 @@ void shouldThrowWhenConnectionIdIsNull()
179
213
void shouldCloseChannelOnFailure () throws Exception
180
214
{
181
215
ChannelPromise channelPromise = channel .newPromise ();
216
+ <<<<<<< HEAD
182
217
HelloResponseHandler handler = new HelloResponseHandler ( channelPromise , 3 );
218
+ =======
219
+ HelloResponseHandler handler = new HelloResponseHandler ( channelPromise );
220
+ >>>>>>> parent of 31d 3495 a ... Since Server v4 .0 the server agent received in response to the Hello message is unreliable . Instead , since the server and Bolt protocol versions are aligned , we use the protocol version instead for all connections to Server 4.0 and higher (#708 ) (#718 )
183
221
184
222
RuntimeException error = new RuntimeException ( "Hi!" );
185
223
handler .onFailure ( error );
0 commit comments