Skip to content

Commit

Permalink
DBZ-8340 Add binlog client tests with binlog compression enabled
Browse files Browse the repository at this point in the history
Tests which don't work with compressed binlog are skipped.
  • Loading branch information
vjuranek authored and jpechane committed Oct 24, 2024
1 parent b9305c3 commit 5757462
Showing 1 changed file with 100 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
package com.github.shyiko.mysql.binlog;

import org.testng.SkipException;
import org.testng.annotations.Test;

/**
* @author vjuranek
*/
public class BinaryLogClientBinlogCompressIntegrationTest extends BinaryLogClientGTIDIntegrationTest {
@Override
protected MysqlOnetimeServerOptions getOptions() {
if ( !this.mysqlVersion.atLeast(8,0) ) {
throw new SkipException("skipping binlog compression on 5.x");
}

MysqlOnetimeServerOptions options = new MysqlOnetimeServerOptions();
options.gtid = true;
options.extraParams = "--binlog_transaction_compression=ON";
return options;
}

// These tests fail when binlog compression is enabled because the columns of these types are
// serialized in a plain text representation when the records are uncompressed.

@Test
@Override
public void testDeserializationOfDATE() throws Exception {
throw new SkipException("Skipped due to binlog compression");
}

@Test
@Override
public void testDeserializationOfDATETIME() throws Exception {
throw new SkipException("Skipped due to binlog compression");
}

@Test
@Override
public void testDeserializationOfDateAndTimeAsLong() throws Exception {
throw new SkipException("Skipped due to binlog compression");
}

@Test
@Override
public void testDeserializationOfDateAndTimeAsLongMicrosecondsPrecision() throws Exception {
throw new SkipException("Skipped due to binlog compression");
}

@Test
@Override
public void testDeserializationOfSTRING() throws Exception {
throw new SkipException("Skipped due to binlog compression");
}

@Test
@Override
public void testDeserializationOfTIME() throws Exception {
throw new SkipException("Skipped due to binlog compression");
}

@Test
@Override
public void testDeserializationOfTIMESTAMP() throws Exception {
throw new SkipException("Skipped due to binlog compression");
}

@Test
@Override
public void testDeserializationOfVARSTRING() throws Exception {
throw new SkipException("Skipped due to binlog compression");
}

@Test
@Override
public void testFSP() throws Exception {
throw new SkipException("Skipped due to binlog compression");
}

@Test
@Override
public void testWriteUpdateDeleteEvents() throws Exception {
throw new SkipException("Skipped due to binlog compression");
}

// This test tests custom deserializer which and assumes ordinary binlog,
// it can be skipped in this testsuite.
@Test
@Override
public void testCustomEventDataDeserializers() throws Exception {
throw new SkipException("Skipped due to binlog compression");
}

// This test tests switch to specific position in events and checks number of WriteRowsEventData events.
// In case of compressed binlog we are not able to switch in the middle of the TX.
@Test
@Override
public void testBinlogPositionPointsToTableMapEventUntilTheEndOfLogicalGroup() throws Exception {
throw new SkipException("Skipped due to binlog compression");
}
}

0 comments on commit 5757462

Please sign in to comment.