open-telemetry / open-telemetry/opentelemetry-java-instrumentation
benchmark windows test failed
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 2.6k
- Forks
- 1.2k
- Avg merge
- 2d 18h
- Merged PRs (30d)
- 228
Description
Describe the bug
I run OverheadTests in windows OS.
But the test failed: java.nio.file.NoSuchFileException: .\k6_out_none.json.
Steps to reproduce
Just start simply run OverheadTests in windows OS.
Expected behavior
Test passed
Actual behavior
Test failed: java.nio.file.NoSuchFileException: .\k6_out_none.json
Javaagent or library instrumentation version
main branch
Environment
JDK: openjdk version "11.0.21" 2023-10-17
OpenJDK Runtime Environment Temurin-11.0.21+9 (build 11.0.21+9)
OpenJDK 64-Bit Server VM Temurin-11.0.21+9 (build 11.0.21+9, mixed mode)
OS: Win11
docker
Additional context
public GenericContainer<?> build() {
Path k6OutputFile = namingConventions.container.k6Results(agent);
return new GenericContainer<>(DockerImageName.parse("loadimpact/k6"))
.withNetwork(network)
.withNetworkAliases("k6")
.withLogConsumer(new Slf4jLogConsumer(logger))
.withCopyFileToContainer(MountableFile.forHostPath("./k6"), "/app")
/ / \results\k6_out_none.json and /results
.withFileSystemBind(namingConventions.localResults(), namingConventions.containerResults())
.withCreateContainerCmdModifier(cmd -> cmd.withUser("root"))
.withCommand(
"run",
"-u",
String.valueOf(config.getConcurrentConnections()),
"-i",
String.valueOf(config.getTotalIterations()),
"--rps",
String.valueOf(config.getMaxRequestRate()),
"--summary-export",
// The result is `\results\k6_out_none.json`. It is a wrong path in docker, so it won't be mounted.
// That's why the `ResultsCollector` can't find the file
k6OutputFile.toString(),
"/app/basic.js")
.withStartupCheckStrategy(
new OneShotStartupCheckStrategy().withTimeout(Duration.ofMinutes(15)));
}
The same problem in K6Container
public GenericContainer<?> build() {
Path k6OutputFile = namingConventions.container.k6Results(agent);
return new GenericContainer<>(DockerImageName.parse("loadimpact/k6"))
.withNetwork(network)
.withNetworkAliases("k6")
.withLogConsumer(new Slf4jLogConsumer(logger))
.withCopyFileToContainer(MountableFile.forHostPath("./k6"), "/app")
.withFileSystemBind(namingConventions.localResults(), namingConventions.containerResults())
.withCreateContainerCmdModifier(cmd -> cmd.withUser("root"))
.withCommand(
"run",
"-u",
String.valueOf(config.getConcurrentConnections()),
"-i",
String.valueOf(config.getTotalIterations()),
"--rps",
String.valueOf(config.getMaxRequestRate()),
"--summary-export",
//"/results/k6_out_none.json", the file will not be mounted too
k6OutputFile.toString(),
"/app/basic.js")
.withStartupCheckStrategy(
new OneShotStartupCheckStrategy().withTimeout(Duration.ofMinutes(15)));
}
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with OverheadTests and inspect the GenericContainer builders in the code shown, including K6Container, namingConventions, and ResultsCollector. Reproduce the run on Windows and trace how the Windows path for k6_out_none.json is passed into the container. Done means the result file is created at the mounted container path and ResultsCollector can read it.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, java
- Domain
- devops, testing
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 40/100