Skip to content

Commit 5aeac75

Browse files
committed
IGNITE-26991 Fix compatibility test
1 parent 28bf133 commit 5aeac75

2 files changed

Lines changed: 49 additions & 1 deletion

File tree

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
/*
2+
* Licensed to the Apache Software Foundation (ASF) under one or more
3+
* contributor license agreements. See the NOTICE file distributed with
4+
* this work for additional information regarding copyright ownership.
5+
* The ASF licenses this file to You under the Apache License, Version 2.0
6+
* (the "License"); you may not use this file except in compliance with
7+
* the License. You may obtain a copy of the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the License for the specific language governing permissions and
15+
* limitations under the License.
16+
*/
17+
18+
package org.apache.ignite.compatibility.testframework.plugins;
19+
20+
import org.apache.ignite.cluster.ClusterNode;
21+
import org.apache.ignite.internal.GridKernalContext;
22+
import org.apache.ignite.internal.processors.rollingupgrade.RollingUpgradeProcessor;
23+
import org.apache.ignite.spi.IgniteNodeValidationResult;
24+
import org.jetbrains.annotations.Nullable;
25+
26+
/**
27+
* Disabled node validation.
28+
*/
29+
public class DisabledRollingUpgradeProcessor extends RollingUpgradeProcessor {
30+
/**
31+
* @param ctx Kernal context.
32+
*/
33+
public DisabledRollingUpgradeProcessor(GridKernalContext ctx) {
34+
super(ctx);
35+
}
36+
37+
/** {@inheritDoc} */
38+
@Nullable @Override public IgniteNodeValidationResult validateNode(ClusterNode node) {
39+
return null;
40+
}
41+
}

modules/compatibility/src/test/java/org/apache/ignite/compatibility/testframework/plugins/TestCompatibilityPluginProvider.java

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,14 @@ public class TestCompatibilityPluginProvider implements PluginProvider {
105105
/** {@inheritDoc} */
106106
@Nullable @Override public Object createComponent(PluginContext ctx, Class cls) {
107107
if (DiscoveryNodeValidationProcessor.class == cls)
108-
return new DisabledValidationProcessor(kCtx);
108+
try {
109+
Class.forName("org.apache.ignite.internal.processors.rollingupgrade.RollingUpgradeProcessor");
110+
111+
return new DisabledRollingUpgradeProcessor(kCtx);
112+
}
113+
catch (ClassNotFoundException ignore) {
114+
return new DisabledValidationProcessor(kCtx);
115+
}
109116

110117
return null;
111118
}

0 commit comments

Comments
 (0)