DBZ-96 Removes some asserts on tables created by another test case

This commit is contained in:
Horia Chiorean 2016-08-08 12:42:31 +03:00
parent cc496201d2
commit ab24f013d1
5 changed files with 66 additions and 15 deletions

View File

@ -166,20 +166,17 @@ public void shouldValidateAcceptableConfiguration() {
Recommender tableNameRecommender = MySqlConnectorConfig.TABLE_WHITELIST.recommender();
List<Object> tableNames = tableNameRecommender.validValues(MySqlConnectorConfig.TABLE_WHITELIST, config);
assertThat(tableNames).containsOnly("connector_test.customers",
"connector_test.orders",
"connector_test.products",
"connector_test.products_on_hand",
"connector_test_ro.customers",
"connector_test_ro.orders",
"connector_test_ro.products",
"connector_test_ro.products_on_hand",
"regression_test.t1464075356413_testtable6",
"regression_test.dbz_85_fractest",
"regression_test.dbz84_integer_types_table",
"readbinlog_test.product",
"readbinlog_test.purchased",
"readbinlog_test.person");
assertThat(tableNames).contains("connector_test.customers",
"connector_test.orders",
"connector_test.products",
"connector_test.products_on_hand",
"connector_test_ro.customers",
"connector_test_ro.orders",
"connector_test_ro.products",
"connector_test_ro.products_on_hand",
"regression_test.t1464075356413_testtable6",
"regression_test.dbz_85_fractest",
"regression_test.dbz84_integer_types_table");
Testing.debug("List of tableNames: " + tableNames);
// Now set the whitelist to two databases ...

View File

@ -24,6 +24,7 @@
import io.debezium.config.Configuration;
import io.debezium.connector.mysql.MySqlConnectorConfig.SnapshotMode;
import io.debezium.data.Envelope;
import io.debezium.doc.FixFor;
import io.debezium.embedded.AbstractConnectorTest;
import io.debezium.relational.history.FileDatabaseHistory;
import io.debezium.util.Testing;
@ -54,6 +55,7 @@ public void afterEach() {
}
@Test
@FixFor( "DBZ-61" )
public void shouldConsumeAllEventsFromDatabaseUsingBinlogAndNoSnapshot() throws SQLException, InterruptedException {
// Use the DB configuration to define the connector's configuration ...
config = Configuration.create()

View File

@ -10,4 +10,5 @@ log4j.rootLogger=INFO, stdout
# Set up the default logging to be INFO level, then override specific units
log4j.logger.io.debezium=INFO
log4j.logger.io.debezium.embedded.EmbeddedEngine$EmbeddedConfig=WARN
#log4j.logger.io.debezium.connector.mysql.BinlogReader=DEBUG
#log4j.logger.io.debezium.connector.mysql.BinlogReader=DEBUG
#log4j.logger.io.debezium.connector.mysql.SnapshotReader=DEBUG

View File

@ -0,0 +1,49 @@
/*
* Copyright Debezium Authors.
*
* Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0
*/
package io.debezium.doc;
import static java.lang.annotation.ElementType.METHOD;
import static java.lang.annotation.RetentionPolicy.CLASS;
import java.lang.annotation.Documented;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;
/**
* Annotation that can be used to help track that a test is verifying the fix for one or more specific issues. To use, simply
* place this annotation on the test method and reference the JIRA issue number:
*
* <pre>
* &#064;FixFor("DBZ-123")
* &#064;Test
* public void shouldVerifyBehavior() {
* ...
* }
* </pre>
* <p>
* It is also possible to reference multiple JIRA issues if the test is verifying multiple ones:
*
* <pre>
* &#064;FixFor({"DBZ-123","DBZ-456"})
* &#064;Test
* public void shouldVerifyBehavior() {
* ...
* }
* </pre>
*
* </p>
*/
@Documented
@Retention( CLASS )
@Target( METHOD )
public @interface FixFor {
/**
* The JIRA issue for which this is a fix. For example, "DBZ-123".
*
* @return the issue
*/
String[] value();
}

View File

@ -285,6 +285,8 @@ protected int consumeRecords(int numberOfRecords, Consumer<SourceRecord> recordC
+ (numberOfRecords - recordsConsumed) + " more)");
print(record);
}
} else {
return recordsConsumed;
}
}
return recordsConsumed;