Skip to content

Commit 432ebd9

Browse files
committed
fix
1 parent 81322a4 commit 432ebd9

File tree

3 files changed

+10
-19
lines changed

3 files changed

+10
-19
lines changed

instrumentation/powerjob-4.0/javaagent/src/test/java/io/opentelemetry/javaagent/instrumentation/powerjob/v4_0/PowerJobBasicProcessorTest.java

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -176,34 +176,26 @@ void testMapReduceProcessor() throws Exception {
176176
});
177177
}
178178

179-
// ShellProcessor relies on /bin/sh so skip on Windows where that binary is unavailable.
180179
@DisabledOnOs(value = OS.WINDOWS, disabledReason = "ShellProcessor requires /bin/sh")
181180
@Test
182181
void testShellProcessor() throws Exception {
183182
long jobId = 1;
184-
// echo works on both Linux and Windows
185-
String jobParam = "echo test";
183+
String jobParam = "ls";
186184
TaskContext taskContext = genTaskContext(jobId, jobParam);
187185
taskContext.setWorkflowContext(new WorkflowContext(jobId, ""));
188186
taskContext.setOmsLogger(new TestOmsLogger());
189187
BasicProcessor shellProcessor = new ShellProcessor();
190-
Class<?> shellProcessorClass = shellProcessor.getClass();
191-
ProcessResult result = shellProcessor.process(taskContext);
192-
assertThat(result.isSuccess())
193-
.as(
194-
"shell processor result on %s: %s",
195-
System.getProperty("os.name"), result.getMsg())
196-
.isTrue();
188+
shellProcessor.process(taskContext);
197189
testing.waitAndAssertTraces(
198190
trace -> {
199191
trace.hasSpansSatisfyingExactly(
200192
span -> {
201-
span.hasName(String.format("%s.process", shellProcessorClass.getSimpleName()))
193+
span.hasName(String.format("%s.process", ShellProcessor.class.getSimpleName()))
202194
.hasKind(SpanKind.INTERNAL)
203195
.hasStatus(StatusData.unset())
204196
.hasAttributesSatisfyingExactly(
205197
attributeAssertions(
206-
shellProcessorClass.getName(), jobId, jobParam, SHELL_PROCESSOR));
198+
ShellProcessor.class.getName(), jobId, jobParam, SHELL_PROCESSOR));
207199
});
208200
});
209201
}

instrumentation/reactor/reactor-netty/reactor-netty-0.9/javaagent/src/test/java/io/opentelemetry/javaagent/instrumentation/reactornetty/v0_9/ReactorNettyHttpClientTest.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,10 @@ protected void configure(HttpClientTestOptions.Builder optionsBuilder) {
4646
optionsBuilder.setTestRemoteConnection(false);
4747
}
4848

49-
// Disable single connection tests on Windows due to networking stack differences
50-
optionsBuilder.setSingleConnectionFactory(
51-
isWindows ? (host, port) -> null : ReactorNettyHttpClientTest::createSingleConnection);
49+
// Only run single connection tests on Linux due to networking stack differences
50+
if (!isWindows) {
51+
optionsBuilder.setSingleConnectionFactory(ReactorNettyHttpClientTest::createSingleConnection);
52+
}
5253
}
5354

5455
private static SingleConnection createSingleConnection(String host, int port) {

instrumentation/reactor/reactor-netty/reactor-netty-1.0/javaagent/src/test/java/io/opentelemetry/javaagent/instrumentation/reactornetty/v1_0/ReactorNettyHttpClientTest.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,8 @@ protected void configure(HttpClientTestOptions.Builder optionsBuilder) {
4040
optionsBuilder.setTestRemoteConnection(false);
4141
}
4242

43-
// Disable single connection tests on Windows due to networking stack differences
44-
if (isWindows) {
45-
optionsBuilder.setSingleConnectionFactory((host, port) -> null);
46-
} else {
43+
// Only run single connection tests on Linux due to networking stack differences
44+
if (!isWindows) {
4745
optionsBuilder.setSingleConnectionFactory(
4846
(host, port) -> {
4947
HttpClient httpClient =

0 commit comments

Comments
 (0)