Skip to content

Commit 5757462

Browse files
vjuranekjpechane
authored andcommitted
DBZ-8340 Add binlog client tests with binlog compression enabled
Tests which don't work with compressed binlog are skipped.
1 parent b9305c3 commit 5757462

File tree

1 file changed

+100
-0
lines changed

1 file changed

+100
-0
lines changed
Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
package com.github.shyiko.mysql.binlog;
2+
3+
import org.testng.SkipException;
4+
import org.testng.annotations.Test;
5+
6+
/**
7+
* @author vjuranek
8+
*/
9+
public class BinaryLogClientBinlogCompressIntegrationTest extends BinaryLogClientGTIDIntegrationTest {
10+
@Override
11+
protected MysqlOnetimeServerOptions getOptions() {
12+
if ( !this.mysqlVersion.atLeast(8,0) ) {
13+
throw new SkipException("skipping binlog compression on 5.x");
14+
}
15+
16+
MysqlOnetimeServerOptions options = new MysqlOnetimeServerOptions();
17+
options.gtid = true;
18+
options.extraParams = "--binlog_transaction_compression=ON";
19+
return options;
20+
}
21+
22+
// These tests fail when binlog compression is enabled because the columns of these types are
23+
// serialized in a plain text representation when the records are uncompressed.
24+
25+
@Test
26+
@Override
27+
public void testDeserializationOfDATE() throws Exception {
28+
throw new SkipException("Skipped due to binlog compression");
29+
}
30+
31+
@Test
32+
@Override
33+
public void testDeserializationOfDATETIME() throws Exception {
34+
throw new SkipException("Skipped due to binlog compression");
35+
}
36+
37+
@Test
38+
@Override
39+
public void testDeserializationOfDateAndTimeAsLong() throws Exception {
40+
throw new SkipException("Skipped due to binlog compression");
41+
}
42+
43+
@Test
44+
@Override
45+
public void testDeserializationOfDateAndTimeAsLongMicrosecondsPrecision() throws Exception {
46+
throw new SkipException("Skipped due to binlog compression");
47+
}
48+
49+
@Test
50+
@Override
51+
public void testDeserializationOfSTRING() throws Exception {
52+
throw new SkipException("Skipped due to binlog compression");
53+
}
54+
55+
@Test
56+
@Override
57+
public void testDeserializationOfTIME() throws Exception {
58+
throw new SkipException("Skipped due to binlog compression");
59+
}
60+
61+
@Test
62+
@Override
63+
public void testDeserializationOfTIMESTAMP() throws Exception {
64+
throw new SkipException("Skipped due to binlog compression");
65+
}
66+
67+
@Test
68+
@Override
69+
public void testDeserializationOfVARSTRING() throws Exception {
70+
throw new SkipException("Skipped due to binlog compression");
71+
}
72+
73+
@Test
74+
@Override
75+
public void testFSP() throws Exception {
76+
throw new SkipException("Skipped due to binlog compression");
77+
}
78+
79+
@Test
80+
@Override
81+
public void testWriteUpdateDeleteEvents() throws Exception {
82+
throw new SkipException("Skipped due to binlog compression");
83+
}
84+
85+
// This test tests custom deserializer which and assumes ordinary binlog,
86+
// it can be skipped in this testsuite.
87+
@Test
88+
@Override
89+
public void testCustomEventDataDeserializers() throws Exception {
90+
throw new SkipException("Skipped due to binlog compression");
91+
}
92+
93+
// This test tests switch to specific position in events and checks number of WriteRowsEventData events.
94+
// In case of compressed binlog we are not able to switch in the middle of the TX.
95+
@Test
96+
@Override
97+
public void testBinlogPositionPointsToTableMapEventUntilTheEndOfLogicalGroup() throws Exception {
98+
throw new SkipException("Skipped due to binlog compression");
99+
}
100+
}

0 commit comments

Comments
 (0)