[FLINK-11334] Fix matcher in TypeSerializerSnapshotMigrationTestBase

上级 ba5c495c
......@@ -443,17 +443,17 @@ public abstract class TypeSerializerSnapshotMigrationTestBase<ElementT> extends
// Utilities
// --------------------------------------------------------------------------------------------------------------
private <T> Matcher<TypeSerializerSchemaCompatibility<T>> hasSameCompatibilityType(TypeSerializerSchemaCompatibility<T> expectedCompatibilty) {
private static <T> Matcher<TypeSerializerSchemaCompatibility<T>> hasSameCompatibilityType(TypeSerializerSchemaCompatibility<T> expectedCompatibilty) {
return new TypeSafeMatcher<TypeSerializerSchemaCompatibility<T>>() {
@Override
protected boolean matchesSafely(TypeSerializerSchemaCompatibility<T> testResultCompatibility) {
if (expectedCompatibilty.isCompatibleAsIs()) {
return testResultCompatibility.isCompatibleAsIs();
} else if (expectedCompatibilty.isIncompatible()) {
return testResultCompatibility.isCompatibleAfterMigration();
} else if (expectedCompatibilty.isIncompatible()) {
return testResultCompatibility.isIncompatible();
} else if (expectedCompatibilty.isCompatibleAfterMigration()) {
return testResultCompatibility.isCompatibleAfterMigration();
} else if (expectedCompatibilty.isCompatibleWithReconfiguredSerializer()) {
return testResultCompatibility.isCompatibleWithReconfiguredSerializer();
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册