|
20 | 20 |
|
21 | 21 | import org.apache.wayang.java.channels.JavaChannelInstance; |
22 | 22 | import org.apache.wayang.java.execution.JavaExecutor; |
| 23 | + |
23 | 24 | import org.junit.jupiter.api.AfterEach; |
24 | 25 | import org.junit.jupiter.api.Assumptions; |
25 | 26 | import org.junit.jupiter.api.BeforeEach; |
26 | 27 | import org.junit.jupiter.api.Disabled; |
27 | 28 | import org.junit.jupiter.api.Test; |
28 | 29 |
|
29 | 30 | import java.net.URL; |
30 | | -import java.time.Duration; |
31 | | -import java.time.Instant; |
32 | 31 | import java.util.List; |
33 | 32 | import java.util.Locale; |
34 | | -import java.util.stream.Stream; |
35 | | - |
36 | 33 | import static org.junit.jupiter.api.Assertions.assertEquals; |
37 | 34 |
|
38 | 35 | /** |
@@ -114,20 +111,20 @@ void testReadRemoteFileHTTP() throws Exception { |
114 | 111 | @Test |
115 | 112 | void testReadRemoteFileHTTPS() throws Exception { |
116 | 113 | try { |
117 | | - final String testFileURL = "https://downloads.apache.org/incubator/wayang/1.0.0/RELEASE_NOTES"; |
| 114 | + final String testFileURL = "https://downloads.apache.org/incubator/wayang/1.0.0/RELEASE_NOTES"; |
118 | 115 |
|
119 | | - // Prepare the source. |
120 | | - final URL inputUrl = new URL(testFileURL); |
121 | | - final JavaTextFileSource source = new JavaTextFileSource(inputUrl.toString()); |
| 116 | + // Prepare the source. |
| 117 | + final URL inputUrl = new URL(testFileURL); |
| 118 | + final JavaTextFileSource source = new JavaTextFileSource(inputUrl.toString()); |
122 | 119 |
|
123 | | - // Execute. |
124 | | - final JavaChannelInstance[] inputs = new JavaChannelInstance[] {}; |
125 | | - final JavaChannelInstance[] outputs = new JavaChannelInstance[] { createStreamChannelInstance() }; |
126 | | - evaluate(source, inputs, outputs); |
| 120 | + // Execute. |
| 121 | + final JavaChannelInstance[] inputs = new JavaChannelInstance[] {}; |
| 122 | + final JavaChannelInstance[] outputs = new JavaChannelInstance[] { createStreamChannelInstance() }; |
| 123 | + evaluate(source, inputs, outputs); |
127 | 124 |
|
128 | | - // Verify the outcome. |
129 | | - final List<String> result = outputs[0].<String>provideStream().toList(); |
130 | | - assertEquals(64, result.size()); |
| 125 | + // Verify the outcome. |
| 126 | + final List<String> result = outputs[0].<String>provideStream().toList(); |
| 127 | + assertEquals(64, result.size()); |
131 | 128 | } catch (final Exception e) { |
132 | 129 | Assumptions.assumeTrue(false, "Skipping test due to possible network error: " + e.getMessage()); |
133 | 130 | } |
|
0 commit comments