Skip to content

Commit

Permalink
Disable remaining JavaScript-based tests on Java 15+
Browse files Browse the repository at this point in the history
This commit disables all remaining JavaScript-based tests on Java 15 or
higher since the Nashorn JavaScript engine is no longer part of the JDK.
  • Loading branch information
sbrannen committed Apr 28, 2020
1 parent 71ed814 commit c3f4394
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
* @author Juergen Hoeller
* @since 4.2
*/
@DisabledForJreRange(min = JAVA_15)
@DisabledForJreRange(min = JAVA_15) // Nashorn JavaScript engine removed in Java 15
public class StandardScriptFactoryTests {

@Test
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2019 the original author or authors.
* Copyright 2002-2020 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -20,6 +20,7 @@
import java.util.Map;

import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.condition.DisabledForJreRange;

import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.annotation.Bean;
Expand All @@ -36,12 +37,14 @@
import org.springframework.web.testfixture.server.MockServerWebExchange;

import static org.assertj.core.api.Assertions.assertThat;
import static org.junit.jupiter.api.condition.JRE.JAVA_15;

/**
* Unit tests for pure JavaScript templates running on Nashorn engine.
*
* @author Sebastien Deleuze
*/
@DisabledForJreRange(min = JAVA_15) // Nashorn JavaScript engine removed in Java 15
public class NashornScriptTemplateTests {

@Test
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2019 the original author or authors.
* Copyright 2002-2020 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -29,6 +29,7 @@

import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.condition.DisabledForJreRange;

import org.springframework.beans.DirectFieldAccessor;
import org.springframework.context.ApplicationContextException;
Expand All @@ -37,6 +38,7 @@
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.assertThatExceptionOfType;
import static org.assertj.core.api.Assertions.assertThatIllegalArgumentException;
import static org.junit.jupiter.api.condition.JRE.JAVA_15;
import static org.mockito.BDDMockito.given;
import static org.mockito.Mockito.mock;

Expand All @@ -45,6 +47,7 @@
*
* @author Sebastien Deleuze
*/
@DisabledForJreRange(min = JAVA_15) // Nashorn JavaScript engine removed in Java 15
public class ScriptTemplateViewTests {

private ScriptTemplateView view;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2019 the original author or authors.
* Copyright 2002-2020 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -23,6 +23,7 @@

import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.condition.DisabledForJreRange;

import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.annotation.Bean;
Expand All @@ -33,13 +34,15 @@
import org.springframework.web.testfixture.servlet.MockServletContext;

import static org.assertj.core.api.Assertions.assertThat;
import static org.junit.jupiter.api.condition.JRE.JAVA_15;
import static org.mockito.Mockito.mock;

/**
* Unit tests for pure Javascript templates running on Nashorn engine.
* Unit tests for pure JavaScript templates running on Nashorn engine.
*
* @author Sebastien Deleuze
*/
@DisabledForJreRange(min = JAVA_15) // Nashorn JavaScript engine removed in Java 15
public class NashornScriptTemplateTests {

private WebApplicationContext webAppContext;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2019 the original author or authors.
* Copyright 2002-2020 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -31,6 +31,7 @@

import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.condition.DisabledForJreRange;

import org.springframework.beans.DirectFieldAccessor;
import org.springframework.context.ApplicationContextException;
Expand All @@ -46,6 +47,7 @@
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.assertThatExceptionOfType;
import static org.assertj.core.api.Assertions.assertThatIllegalArgumentException;
import static org.junit.jupiter.api.condition.JRE.JAVA_15;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.BDDMockito.given;
import static org.mockito.Mockito.mock;
Expand All @@ -55,6 +57,7 @@
*
* @author Sebastien Deleuze
*/
@DisabledForJreRange(min = JAVA_15) // Nashorn JavaScript engine removed in Java 15
public class ScriptTemplateViewTests {

private ScriptTemplateView view;
Expand Down

0 comments on commit c3f4394

Please sign in to comment.