在空手道中,我正在进行深度比较,但由于该虚拟机崩溃,它使用了太多堆空间

问题描述 投票:0回答:1

我正在空手道中进行深度比较,同时匹配响应,但是当响应不匹配时,需要太多的堆空间来比较,这会导致虚拟机崩溃。 出现的具体错误是:

[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  03:29 min
[INFO] Finished at: 2024-04-03T11:48:30+05:30
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.19.1:test (default-test) on project Hotels-API-Guardian: Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:2.19.1:test failed: The forked VM terminated without properly saying goodbye. VM crash or System.exit called?
[ERROR] Command was /bin/sh -c cd /opt/jenkins/workspace/HOTELS-TA-JDK19-Github && /opt/java/openjdk/bin/java -jar /opt/jenkins/workspace/HOTELS-TA-JDK19-Github/target/surefire/surefirebooter2363923029464916214.jar /opt/jenkins/workspace/HOTELS-TA-JDK19-Github/target/surefire/surefire368058004839570379tmp /opt/jenkins/workspace/HOTELS-TA-JDK19-Github/target/surefire/surefire_04507318838578109367tmp

我尝试将堆空间增加到12GB,但仍然出现问题

cucumber karate maven-surefire-plugin
1个回答
0
投票

这个答案可能会提供提示:https://stackoverflow.com/a/67245228/143475

应该可以重写你的断言以减少内存占用。大多数团队不会遇到这个问题。

还请考虑贡献代码来改进空手道。

© www.soinside.com 2019 - 2024. All rights reserved.