Skip to content

Commit

Permalink
Merge pull request #27893 from pnicolucci/RepeatWsocFATForEE11
Browse files Browse the repository at this point in the history
Repeat io.openliberty.wsoc.internal_fat for Jakarta EE11
  • Loading branch information
pnicolucci committed Mar 14, 2024
2 parents f7e4da8 + 7f2ef11 commit 7a9ca51
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 32 deletions.
13 changes: 8 additions & 5 deletions dev/io.openliberty.wsoc.internal_fat/bnd.bnd
@@ -1,14 +1,11 @@
#*******************************************************************************
# Copyright (c) 2020, 2023 IBM Corporation and others.
# Copyright (c) 2020, 2024 IBM Corporation and others.
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Eclipse Public License 2.0
# which accompanies this distribution, and is available at
# http://www.eclipse.org/legal/epl-2.0/
#
# SPDX-License-Identifier: EPL-2.0
#
# Contributors:
# IBM Corporation - initial API and implementation
#*******************************************************************************
-include= ~../cnf/resources/bnd/bundle.props
bVersion=1.0
Expand Down Expand Up @@ -44,7 +41,13 @@ tested.features: \
xmlbinding-4.0, \
cdi-4.0, \
expressionlanguage-5.0, \
appsecurity-5.0
appsecurity-5.0, \
expressionlanguage-6.0, \
appsecurity-6.0, \
websocket-2.2, \
noship-1.0, \
cdi-4.1, \
servlet-6.1

-buildpath: \
com.ibm.websphere.javaee.annotation.1.1;version=latest,\
Expand Down
@@ -1,14 +1,11 @@
/*******************************************************************************
* Copyright (c) 2012, 2022 IBM Corporation and others.
* Copyright (c) 2012, 2024 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* IBM Corporation - initial API and implementation
* SPDX-License-Identifier: EPL-2.0
*******************************************************************************/
package io.openliberty.wsoc;

Expand All @@ -23,7 +20,6 @@
import componenttest.rules.repeater.EmptyAction;
import componenttest.rules.repeater.FeatureReplacementAction;
import componenttest.rules.repeater.RepeatTests;
import componenttest.topology.impl.JavaInfo;
import io.openliberty.wsoc.tests.BasicTest;
import io.openliberty.wsoc.tests.Cdi12Test;
import io.openliberty.wsoc.tests.Cdi20Test;
Expand Down Expand Up @@ -53,28 +49,24 @@
})
public class FATSuite {

//websocket-1.0 is not part of EE6/7/8, so we need to do a manual replacement
// websocket-1.0 is not part of EE6/7/8, so we need to do a manual replacement
// EE10 requires Java 11.
// EE11 requires Java 17
// If we only specify EE10/EE11 for lite mode it will cause no tests to run with lower Java versions which causes an error.
// If we are running with a Java version less than 11, have EE9 be the lite mode test to run.
@ClassRule
public static RepeatTests repeat;


static {
if(JavaInfo.JAVA_VERSION >= 11) {
repeat = RepeatTests.with(new EmptyAction().fullFATOnly())
.andWith(FeatureReplacementAction.EE9_FEATURES()
.removeFeature("websocket-1.0")
.addFeature("websocket-2.0")
.fullFATOnly())
.andWith(FeatureReplacementAction.EE10_FEATURES()
.removeFeature("websocket-1.0")
.addFeature("websocket-2.1"));
} else {
repeat = RepeatTests.with(new EmptyAction().fullFATOnly())
.andWith(FeatureReplacementAction.EE9_FEATURES()
.removeFeature("websocket-1.0")
.addFeature("websocket-2.0"));
}
}
public static RepeatTests repeat = RepeatTests.with(new EmptyAction().fullFATOnly())
.andWith(FeatureReplacementAction.EE9_FEATURES()
.removeFeature("websocket-1.0")
.addFeature("websocket-2.0")
.conditionalFullFATOnly(FeatureReplacementAction.GREATER_THAN_OR_EQUAL_JAVA_11))
.andWith(FeatureReplacementAction.EE10_FEATURES()
.removeFeature("websocket-1.0")
.addFeature("websocket-2.1")
.conditionalFullFATOnly(FeatureReplacementAction.GREATER_THAN_OR_EQUAL_JAVA_17))
.andWith(FeatureReplacementAction.EE11_FEATURES()
.removeFeature("websocket-1.0")
.addFeature("websocket-2.2"));

/**
* @see {@link FatLogHandler#generateHelpFile()}
Expand Down

0 comments on commit 7a9ca51

Please sign in to comment.