Skip to content

Commit 8f4cb94

Browse files
committed
Fix build to exclude vector tests when using Java 17
(merge main -> ce/main 108328) [git-p4: depot-paths = "//dev/coherence-ce/main/": change = 108329]
1 parent 2470c73 commit 8f4cb94

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

prj/coherence-ai/pom.xml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,4 +207,18 @@
207207
</plugin>
208208
</plugins>
209209
</build>
210+
211+
<profiles>
212+
<!-- We do not run tests if the JVM is not 21 or higher -->
213+
<profile>
214+
<id>NotJava21</id>
215+
<activation>
216+
<jdk>(,20]</jdk>
217+
</activation>
218+
<properties>
219+
<is.not.java.21>true</is.not.java.21>
220+
<skipTests>true</skipTests>
221+
</properties>
222+
</profile>
223+
</profiles>
210224
</project>

prj/test/functional/grpc-proxy-tck/src/main/java/grpc/proxy/ai/VectorServiceIT.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737

3838
import com.oracle.coherence.grpc.proxy.common.NamedCacheService;
3939

40+
import com.oracle.coherence.testing.CheckJDK;
4041
import com.tangosol.io.ReadBuffer;
4142
import com.tangosol.io.Serializer;
4243

@@ -52,6 +53,8 @@
5253

5354
import io.grpc.stub.StreamObserver;
5455

56+
import org.junit.jupiter.api.Assumptions;
57+
import org.junit.jupiter.api.BeforeAll;
5558
import org.junit.jupiter.api.BeforeEach;
5659
import org.junit.jupiter.api.Test;
5760
import org.junit.jupiter.api.TestInfo;
@@ -75,6 +78,13 @@
7578
public class VectorServiceIT
7679
extends BaseGrpcIT
7780
{
81+
@BeforeAll
82+
static void checkJavaVersion()
83+
{
84+
Assumptions.assumeTrue(CheckJDK.computeVersion(System.getProperty("java.version")) >= 21,
85+
"Test skipped as the Java version is less than 21");
86+
}
87+
7888
@BeforeEach
7989
void setupTestInfo(TestInfo info)
8090
{

0 commit comments

Comments
 (0)