@@ -451,8 +451,7 @@ private Serializable[] writeAndCaptureRow(BinaryLogClient client, final String c
451
451
final String ... values ) throws Exception {
452
452
CapturingEventListener capturingEventListener = new CapturingEventListener ();
453
453
client .registerEventListener (capturingEventListener );
454
- // ensure "capturingEventListener -> eventListener" order
455
- client .unregisterEventListener (eventListener );
454
+ CountDownEventListener eventListener = new CountDownEventListener ();
456
455
client .registerEventListener (eventListener );
457
456
try {
458
457
master .execute (new Callback <Statement >() {
@@ -472,6 +471,7 @@ public void execute(Statement statement) throws SQLException {
472
471
});
473
472
eventListener .waitFor (WriteRowsEventData .class , 1 , DEFAULT_TIMEOUT );
474
473
} finally {
474
+ client .unregisterEventListener (eventListener );
475
475
client .unregisterEventListener (capturingEventListener );
476
476
}
477
477
List <Serializable []> writtenRows =
@@ -648,6 +648,7 @@ public void execute(Statement statement) throws SQLException {
648
648
eventListener .waitFor (WriteRowsEventData .class , 1 , DEFAULT_TIMEOUT );
649
649
}
650
650
651
+ @ SuppressWarnings ("deprecation" )
651
652
@ Test
652
653
public void testAutomaticFailover () throws Exception {
653
654
TCPReverseProxy tcpReverseProxy = new TCPReverseProxy (33262 , slave .port );
@@ -731,6 +732,7 @@ private void testCommunicationFailureInTheMiddleOfEventDataDeserialization(final
731
732
testCommunicationFailure (eventDeserializer );
732
733
}
733
734
735
+ @ SuppressWarnings ("deprecation" )
734
736
protected void testCommunicationFailure (EventDeserializer eventDeserializer ) throws Exception {
735
737
try {
736
738
client .disconnect ();
@@ -1071,8 +1073,8 @@ public MySQLConnection(String hostname, int port, String username, String passwo
1071
1073
}
1072
1074
1073
1075
private void connect () throws SQLException {
1074
- this .connection = DriverManager .getConnection ("jdbc:mysql://" + hostname + ":" + port ,
1075
- username , password );
1076
+ this .connection = DriverManager .getConnection ("jdbc:mysql://" + hostname + ":" + port +
1077
+ "?serverTimezone=UTC" , username , password );
1076
1078
execute (new Callback <Statement >() {
1077
1079
1078
1080
@ Override
0 commit comments