Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

benchmark windows test failed #9720

Open
yindaa opened this issue Oct 19, 2023 · 1 comment
Open

benchmark windows test failed #9720

yindaa opened this issue Oct 19, 2023 · 1 comment
Labels
bug Something isn't working contribution welcome Request makes sense, maintainers probably won't have time, contribution would be welcome

Comments

@yindaa
Copy link

yindaa commented Oct 19, 2023

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)));
  }
@yindaa yindaa added bug Something isn't working needs triage New issue that requires triage labels Oct 19, 2023
@laurit
Copy link
Contributor

laurit commented Oct 20, 2023

@Yida-x I believe this has been reported before. This far we have not been able to find a windows user who'd be willing to fix this. Please submit a PR if you are able to figure out how to fix this.

@laurit laurit added contribution welcome Request makes sense, maintainers probably won't have time, contribution would be welcome and removed needs triage New issue that requires triage labels Oct 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working contribution welcome Request makes sense, maintainers probably won't have time, contribution would be welcome
Projects
None yet
Development

No branches or pull requests

2 participants