GH-370: Enable ScriptProcessor tests back (#419)
* GH-370: Enable ScriptProcessor tests back Fixes https://github.com/spring-cloud/stream-applications/issues/370 * Update dependencies for `script-processor` * Add `maven-surefire-plugin` to `script-processor` POM and specify `--add-opens` for Ruby requirements * Mark all JavaScript tests with `@EnabledIfSystemProperty` against `org.graalvm.language.js.home` which is available only if GraalVM with `js` component enabled * Fix `NewlineAtEndOfFile` rule for Checkstyle since on Windows the line end is `crlf` * Add `components: 'js'` to GraalVM installation steps for all the GH action scripts * * Add dependencies for `graal-sdk` and `org.graalvm.js` to make JavaScript working on a plain JVM
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2015-2022 the original author or authors.
|
||||
* Copyright 2015-2023 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.
|
||||
@@ -19,7 +19,6 @@ package org.springframework.cloud.stream.app.processor.script;
|
||||
import java.io.IOException;
|
||||
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import org.junit.jupiter.api.Disabled;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import org.springframework.boot.WebApplicationType;
|
||||
@@ -46,7 +45,6 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||
*/
|
||||
public class ScriptProcessorIntegrationTests {
|
||||
|
||||
@Disabled
|
||||
@Test
|
||||
public void testJavascriptFunctions() throws IOException {
|
||||
try (ConfigurableApplicationContext context = new SpringApplicationBuilder(
|
||||
@@ -68,7 +66,6 @@ public class ScriptProcessorIntegrationTests {
|
||||
}
|
||||
}
|
||||
|
||||
@Disabled
|
||||
@Test
|
||||
public void testJavascriptVariableTake1() {
|
||||
try (ConfigurableApplicationContext context = new SpringApplicationBuilder(
|
||||
@@ -88,7 +85,6 @@ public class ScriptProcessorIntegrationTests {
|
||||
}
|
||||
}
|
||||
|
||||
@Disabled
|
||||
@Test
|
||||
public void testJavascriptVariableTake2() {
|
||||
try (ConfigurableApplicationContext context = new SpringApplicationBuilder(
|
||||
@@ -104,7 +100,7 @@ public class ScriptProcessorIntegrationTests {
|
||||
|
||||
processorInput.send(new GenericMessage<>(9));
|
||||
Message<byte[]> sourceMessage = processorOutput.receive(10000, "scriptProcessorFunction-out-0");
|
||||
assertThat(new String(sourceMessage.getPayload())).isEqualTo("45.0");
|
||||
assertThat(new String(sourceMessage.getPayload())).isEqualTo("45");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -146,7 +142,6 @@ public class ScriptProcessorIntegrationTests {
|
||||
}
|
||||
}
|
||||
|
||||
@Disabled
|
||||
@Test
|
||||
public void testRubyScript() {
|
||||
try (ConfigurableApplicationContext context = new SpringApplicationBuilder(
|
||||
@@ -165,7 +160,6 @@ public class ScriptProcessorIntegrationTests {
|
||||
}
|
||||
}
|
||||
|
||||
@Disabled
|
||||
@Test
|
||||
public void testRubyScriptComplex() {
|
||||
try (ConfigurableApplicationContext context = new SpringApplicationBuilder(
|
||||
@@ -220,7 +214,6 @@ public class ScriptProcessorIntegrationTests {
|
||||
}
|
||||
}
|
||||
|
||||
@Disabled
|
||||
@Test
|
||||
public void testGroovyToJavascript() {
|
||||
try (ConfigurableApplicationContext context = new SpringApplicationBuilder(
|
||||
@@ -241,7 +234,8 @@ public class ScriptProcessorIntegrationTests {
|
||||
}
|
||||
|
||||
@EnableAutoConfiguration
|
||||
@Import({ScriptProcessorConfiguration.class})
|
||||
@Import(ScriptProcessorConfiguration.class)
|
||||
public static class ScriptProcessorTestConfiguration {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user