Skip to content

Commit

Permalink
[FLINK-11334] Fix matcher in TypeSerializerSnapshotMigrationTestBase
Browse files Browse the repository at this point in the history
  • Loading branch information
aljoscha committed Feb 21, 2019
1 parent ba5c495 commit 5095853
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -443,17 +443,17 @@ protected interface TestResourceFilenameSupplier {
// 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();
}
Expand Down

0 comments on commit 5095853

Please sign in to comment.