无法运行密钥斗篷性能测试套件

问题描述

我按照此README.md文件提供的步骤进行操作 Keycloak testsuite readme

我能够构建项目,但是当我运行时 cd testsuite/performance mvn clean install

我得到了

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:1.8:run (configure-infinispan) on project performance-keycloak-infinispan-server: An Ant BuildException has occured: The following error occurred while executing this line:
[ERROR] /Users/sahilpaudel/Documents/Java/keycloak-testing/keycloak/testsuite/performance/infinispan/infinispan.xml:37: Execute Failed: java.io.IOException: Cannot run program "./ispn-cli.sh" (in directory "/Users/sahilpaudel/Documents/Java/keycloak-testing/keycloak/testsuite/performance/infinispan/target/infinispan-server-10.1.8.Final/bin"): error=2,No such file or directory
[ERROR] around Ant part ...<ant antfile="infinispan.xml" target="configure-infinispan"/>... @ 4:64 in /Users/sahilpaudel/Documents/Java/keycloak-testing/keycloak/testsuite/performance/infinispan/target/antrun/build-main.xml
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors,re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions,please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
[ERROR]
[ERROR] After correcting the problems,you can resume the build with the command
[ERROR]   mvn <args> -rf :performance-keycloak-infinispan-server

有没有人遇到此问题并解决。 我尝试了问题跟踪器,但它是单独托管的,以前没有这样的堆栈跟踪器。

解决方法

TLDR;如果您需要对 Keycloak 进行性能测试,请尝试使用较新的版本 https://github.com/keycloak/keycloak-benchmark


我在 Keycloak 12.0.4 上遇到了同样的问题,以下是我的研究:

我发现 ispn-cli.sh 是 infinispan cli 的 old name。现在 the namecli.sh 但是如果您将 cli.sh 重命名为 ispn-cli.sh,它将不起作用。因为你会遇到另一个类似下面的问题,这意味着缺少 ...standalone/configuration/clustered.xml

main:

check-configuration-state:
     [echo] configured: ${configured}
     [echo] management.configured: ${management.configured}

configure-infinispan:
     [copy] Copying 1 file to /home/ubuntu/keycloak12/testsuite/performance/infinispan/target/infinispan-server-11.0.4.Final/bin
     [exec] org.aesh.command.parser.CommandLineParserException: batch 'embed-server' is not a batch command. See 'batch --help'.
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for Keycloak Performance TestSuite 12.0.4:
[INFO]
[INFO] Keycloak Performance TestSuite ..................... SUCCESS [  1.718 s]
[INFO] Keycloak Performance TestSuite - Keycloak Server ... SUCCESS [ 24.548 s]
[INFO] Keycloak Performance TestSuite - Wildfly ModCluster Load Balancer SUCCESS [ 15.843 s]
[INFO] Keycloak Performance TestSuite - Infinispan Server . FAILURE [  2.869 s]
[INFO] Keycloak Performance TestSuite - Tests ............. SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  45.270 s
[INFO] Finished at: 2021-06-19T03:21:30Z
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:1.8:run (configure-infinispan) on project performance-keycloak-infinispan-server: An Ant BuildException has occured: The following error occurred while executing this line:
[ERROR] /home/ubuntu/keycloak12/testsuite/performance/infinispan/infinispan.xml:43: Warning: Could not find file /home/ubuntu/keycloak12/testsuite/performance/infinispan/target/infinispan-server-11.0.4.Final/standalone/configuration/clustered.xml to copy.
[ERROR] around Ant part ...<ant antfile="infinispan.xml" target="configure-infinispan"/>... @ 4:64 in /home/ubuntu/keycloak12/testsuite/performance/infinispan/target/antrun/build-main.xml
[ERROR] -> [Help 1]

所以我浏览了 Keycloak git history 并发现了这个提交 https://github.com/keycloak/keycloak/commit/df68ca8dcfd481ee64801fbc2cecaa0a6359285d infinispan 版本基于 jboss/infinispan-server:8.2.6.Final。然后,我检查了最接近的 infinispan-server 版本(因为已找不到 8.2.6.Final),它包含所有必需的文件。

$ unzip -l infinispan-server-8.1.3.Final-bin.zip | grep -E "standalone/configuration/|ispn-cli.sh"
        0  2016-04-04 08:51   infinispan-server-8.1.3.Final/standalone/configuration/
     2500  2016-04-04 08:51   infinispan-server-8.1.3.Final/bin/ispn-cli.sh
    17968  2016-04-04 08:51   infinispan-server-8.1.3.Final/standalone/configuration/clustered.xml
     1112  2016-04-04 08:51   infinispan-server-8.1.3.Final/standalone/configuration/mgmt-users.properties
      711  2016-04-04 08:51   infinispan-server-8.1.3.Final/standalone/configuration/application-roles.properties
     2697  2016-04-04 08:51   infinispan-server-8.1.3.Final/standalone/configuration/logging.properties
      669  2016-04-04 08:51   infinispan-server-8.1.3.Final/standalone/configuration/mgmt-groups.properties
    12084  2016-04-04 08:51   infinispan-server-8.1.3.Final/standalone/configuration/standalone.xml
      935  2016-04-04 08:51   infinispan-server-8.1.3.Final/standalone/configuration/application-users.properties

除此之外,我发现了这个,它说 infinispan.version 基于根配置。这意味着 infinispan 发生了很大变化,但 testsuite/performance/infinispan 没有跟上。

// testsuite/performance/infinispan/pom.xml
        <infinispan.artifactId>infinispan-server-build</infinispan.artifactId>
        <!--infinispan.version is located in the root pom.xml--> 
        <infinispan.unpacked.folder.name>infinispan-server-${infinispan.version}</infinispan.unpacked.folder.name>

在这次提交中删除了 infinispan 模块: https://github.com/keycloak/keycloak/commit/54c5b1514f0611056f38053081d094cf5e5fd08a#diff-bc3567ad76edc320e3fa85c5e0e5380e09c11f94c8395b80064e195f2ef82793

因此,我强烈怀疑 Keycloak testsuite/performance 已停止。

相关问答

Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其...
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。...
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbc...