In quite a few cases, I noticed that the junit test output was truncated .
e.g. https://builds.apache.org/job/HBase-2.0-hadoop3-tests/org.apache.hbase$hbase-server/218/testReport/junit/org.apache.hadoop.hbase.master.procedure/TestDisableTableProcedure/org_apache_hadoop_hbase_master_procedure_TestDisableTableProcedure/ :
sun.misc.Unsafe.park(Native Method)
java.util.concurrent.locks.LockSupport.park(LockSupport.jav
...[truncated 1107895 chars]...
r$Handler.run(Server.java:2661)
If someone has seen this before, please advise whether there is any config which controls the truncation.
I'm not sure where you have looked what about this: https://builds.apache.org/job/HBase-2.0-hadoop3-tests/org.apache.hbase$hbase-server/218/testReport/junit/org.apache.hadoop.hbase.master.procedure/TestDisableTableProcedure/org_apache_hadoop_hbase_master_procedure_TestDisableTableProcedure/ if you take a look a line before there you can see: ...[truncated 1107895 chars].......this means about 1 MiB has been truncated ...which is done as far as I know by Jenkins...
Furthermore on the usual console log you can see things like this:
[ERROR] Tests run: 5, Failures: 0, Errors: 2, Skipped: 0, Time elapsed: 763.13 s <<< FAILURE! - in org.apache.hadoop.hbase.master.procedure.TestDisableTableProcedure
[ERROR] org.apache.hadoop.hbase.master.procedure.TestDisableTableProcedure Time elapsed: 749.128 s <<< ERROR!
org.junit.runners.model.TestTimedOutException: test timed out after 780 seconds
If you have the need to investigate that more in depth you need to stop the build system and take a look into the workspace of the build and take a look on the surefire reports directory...
Apart from that it makes no sense to start such build by a timer trigger...better you commit trigger instead...
Related
I am trying to run my Test.jmx file through below ant cmd:
C:\apache-ant-1.10.1-bin\bin>ant
I got the following error:
C:\apache-ant-1.10.1-bin\bin>ant
Buildfile: C:\apache-ant-1.10.1-bin\bin\build.xml
run:
[echo] funcMode = false
[jmeter] Executing test plan: C:\apache-ant-1.10.1-bin\bin\Test.jmx ==> C:\apache-ant-1.10.1-bin\bin\Test.jtl
_message_xalan:
xslt-report:
BUILD FAILED
C:\apache-ant-1.10.1-bin\bin\build.xml:124: input file C:\apache-ant-1.10.1-bin\bin\Test.jtl does not exist
Total time: 4 seconds
C:\apache-ant-1.10.1-bin\bin>
I fixed this issue by creating a new Test.jtl file.
Now I am getting this error:
C:\apache-ant-1.10.1-bin\bin>ant -Dtestpath=C:\apache-ant-1.10.1-bin\bin\ -Dtest=Test
Buildfile: C:\apache-ant-1.10.1-bin\bin\build.xml
run:
[echo] funcMode = false
[jmeter] Executing test plan: C:\apache-ant-1.10.1-bin\bin\Test.jmx ==> C:\apache-ant-1.10.1-bin\bin\Test.jtl
_message_xalan:
xslt-report:
[xslt] Processing C:\apache-ant-1.10.1-bin\bin\Test.jtl to C:\apache-ant-1.10.1-bin\bin\Test.html
[xslt] Loading stylesheet C:\apache-ant-1.10.1-bin\bin\jmeter-results-report_21.xsl
[xslt] C:\apache-ant-1.10.1-bin\bin\Test.jtl:1:1: Fatal Error! Premature end of file.
[xslt] Failed to process C:\apache-ant-1.10.1-bin\bin\Test.jtl
BUILD FAILED
C:\apache-ant-1.10.1-bin\bin\build.xml:124: Fatal error during transformation using C:\apache-ant-1.10.1-bin\bin\jmeter-results-report_21.xsl: Premature end of file.; SystemID: file:/C:/apache-ant-1.10.1-bin/bin/Test.jtl; Line#: 1; Column#: 1
Total time: 3 seconds
Actually, the correct answer is here. Just need to remove the comments from these lines:
<jvmarg value="-Xincgc"/>
<jvmarg value="-Xmx128m"/>
<jvmarg value="-Dproperty=value"/>
<jmeterarg value="-qextra.properties"/>
in the extracts\build.xml file.
Most likely your JMeter test is failing therefore it doesn't generate result file. I would suggest amending your target like
<jmeter
jmeterhome="${jmeter.home}"
testplan ="${testpath}/${test}.jmx"
resultlog="${testpath}/${test}.jtl"
jmeterlogfile="${testpath}/jmeter.log>
in build.xml file. The last line will "tell" the JMeter Ant task to generate jmeter.log file under the ${testpath}, you should be able to figure out what goes wrong by looking into this file.
References:
JMeter Ant Task Parameters
Five Ways To Launch a JMeter Test without Using the JMeter GUI
Adding to #Dmitri T answer jtl file is created only if you execute at least 1 Sample, so it won't be created in the following cases:
Your test plan failed and Stopped before executing Sampler
Your test doesn't contain Samplers
Your configuration is wrong and no thread were executed ( for example Thread number is 0)
You can try to execute/view/debug in GUI mode and check what's wrong.
use "resultlogdir" instead of "resultlog"
so change the build.xml like this:
<jmeter
jmeterhome="${jmeter.home}"
testplan ="${testpath}/${test}.jmx"
resultlogdir="${testpath}/log">
and also the "in" property in :
in="${testpath}/log/${test}.jtl"
I have no idea how to explain why, but it worked in my computer
I'm trying to set larger resolution for my tests because if the resolution is under 414 it goes to mobile page. And every time I run my tests it fails because of the resolution. I tried to set higher resolution but Jenkins didn't accept it. No matter what site I try I got the same results. I run Jenkins in combination with Selenium and Maven. This is the code I'm using in Selenium:
WebDriver driver = new ChromeDriver();
System.out.println(driver.manage().window().getSize());
driver.get("https://www.apple.com/");
driver.manage().window().setSize(new Dimension(800, 600));
System.out.println(driver.manage().window().getSize());
I also tried with driver.manage().window().maximize(); which gives also the result of 272. This is what I get on Jenkins console output:
Running GitProject.gittest.AppTest
Configuring TestNG with:
org.apache.maven.surefire.testng.conf.TestNG652Configurator#5f8ed237
Starting ChromeDriver 2.33.506106
(8a06c39c4582fbfbab6966dbb1c38a9173bfb1a2) on port 20546
Only local connections are allowed.
Oct 16, 2017 9:21:34 AM org.openqa.selenium.remote.ProtocolHandshake
createSession
INFO: Detected dialect: OSS
(400, 272)
(800, 272)
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 13.885 sec
Results :
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
I have a Travis CI setup on GitHub. I use it to check my commits for iOS app. The problem is, I very often and randomly get an error 65. I have yet to find a solution.
When I restart the job 2-3 times after it has failed it passes in 90% of times.
I previously also had a problem with logs being too verbose for Travis (>4MB) but I added xcpretty to fix that.
Errors I took from log:
...
Generating 'XYZ.app.dSYM'
❌ error: couldn't remove '/Users/travis/Library/Developer/Xcode/DerivedData/XYZ-aaltcjvmshpmlufpmzdsgbernspl/Build/Products/Debug-iphonesimulator/XYZ.app/SomeName.storyboardc' after command failed: Directory not empty
...
And then at the end of Travis log:
Testing failed:
The file “056-Jj-FAu-view-XmS-Ro-0cO.nib” couldn’t be opened because there is no such file.
error: couldn't remove '/Users/travis/Library/Developer/Xcode/DerivedData/XYZ-aaltcjvmshpmlufpmzdsgbernspl/Build/Products/Debug-iphonesimulator/XYZ.app/SomeName.storyboardc' after command failed: Directory not empty
error: lipo: can't move temporary file: /Users/travis/Library/Developer/Xcode/DerivedData/XYZ-aaltcjvmshpmlufpmzdsgbernspl/Build/Products/Debug-iphonesimulator/XYZ.app.dSYM/Contents/Resources/DWARF/XYZ to file: /Users/travis/Library/Developer/Xcode/DerivedData/XYZ-aaltcjvmshpmlufpmzdsgbernspl/Build/Products/Debug-iphonesimulator/XYZ.app.dSYM/Contents/Resources/DWARF/XYZ.lipo (No such file or directory)
Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/dsymutil emitted errors but did not return a nonzero exit code to indicate failure
** TEST FAILED **
The following build commands failed:
LinkStoryboards
LinkStoryboards
(2 failures)
The command "./scripts/build.sh" exited with 65.
I am using Xcode 8 both in Xcode and Travis settings.
Ah, good question. Occasionally, xcodebuild steps that are failing during the codesigning step can be addressed using travis_retry - Travis will retry the step 3 times for any non-zero exit status, which should reduce the need for you to restart it manually. There are some suggested code snippets in the travis-ci/travis-ci GitHub issue on this as well. Good luck!
If you're running into the error code 65 (from random failures) here's a command you can pipe on the end of your xcodebuild (assuming you're running tests) command to get back more consistent results:
(XCODEBUILD_COMMAND_HERE) | awk 'BEGIN {success=0} $0 ~ /.* tests, with 0 failures \(.*/ {success=1} {print $0} END {if(success==0){exit 1}}
This looks for tests, with 0 failures ( in your output text, thus using the text output of xcodebuild instead of the status code of xcodebuild to determine success.
Note: Keep in mind, if you do something like NSLog(' tests, with 0 failures ('); in your code you make get a false positive, it's very unlikely to happen by accident. You may have to update tests, with 0 failures ( in the awk script between updates of xcodebuild. But, having consistent results with xcodebuild is definitely worth that price.
gradlew setupDecompWorkspace
This mapping 'snapshot_20160518' was designed for MC 1.9.4! Use at your own peril.
#
ForgeGradle 2.2-SNAPSHOT-c438b06
https://github.com/MinecraftForge/ForgeGradle
#
Powered by MCP unknown
http://modcoderpack.com
by: Searge, ProfMobius, Fesh0r,
R4wk, ZeuX, IngisKahn, bspkrs
#
:deobfCompileDummyTask
:deobfProvidedDummyTask
:getVersionJson
:extractUserdev UP-TO-DATE
:extractDependencyATs SKIPPED
:extractMcpData SKIPPED
:extractMcpMappings SKIPPED
:genSrgs SKIPPED
:downloadClient SKIPPED
:downloadServer SKIPPED
:splitServerJar SKIPPED
:mergeJars SKIPPED
:deobfMcSRG SKIPPED
:decompileMc FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':decompileMc'.
> Java heap space
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 36.311 secs
Any help with fixing this error? I got this suggestion from a different page, but I need a little bit more then the unspecific instructions here:
"In case you will receive an error while running the task :decompileMC ( the fourth step )
Execution failed for task ':decompileMc'.
GC overhead limit exceeded
assign more RAM into gradle by adding org.gradle.jvmargs=-Xmx2G into the file ~/.gradle/gradle.properties (create file if doesn’t exist)."
Please take into consideration that I have very limited knowledge of CMD and a mild knowledge of java as I am just starting out in this 'coding' thing. Cheers for the responses that come!
are you on linux?
if then type
cd $home/.gradle
then
pico gradle.properties
type in it
org.gradle.jvmargs=-Xmx2G
CTRL + X to save
then try again.
Your java process simply needs more ram assigned than it gets default.
I'm currently trying to set up cruisecontrol to run my selenium test suite. Everything works fine until I run the build, I got the following message:
calling target(s) [execute-test] in build file C:\Project\src\build.xml
Entering C:\Project\src\build.xml...
Exiting C:\Project\src\build.xml.
task location="C:\Project\src\build.xml:30: " name="antcall" time="0 seconds"
target name="execute-test" time="0 seconds"
task location="C:\Project\src\build.xml:37: " name="testng" time="0 seconds"
Executing 'C:\Program Files (x86)\Java\jdk1.6.0_06\jre\bin\java.exe' with arguments:
'-ea'
'-classpath'
'C:\testng;C:\testng\testng-5.9-jdk15.jar;C:\testng\commons-lang-2.0.jar;C:\testng\testng-5.9-jdk14.jar'
'org.testng.TestNG'
'#C:\DOCUME~1\SERVER~1\LOCALS~1\Temp\1\testng10509'
The ' characters around the executable and arguments are
not part of the command.
[Parser] Running:
C:\Project\src\TestSuite.xml
[TestRunner] Running the tests in 'testInpagePlacement' with parallel mode:false
[RunInfo] Adding method selector: org.testng.internal.XmlMethodSelector#9664a1 priority: 10
[ClassHelper] Could not instantiate testcase1: testcase1
[ClassHelper] Could not instantiate testcase1: testcase1
===============================================
[Smoke test]
[Total tests run: 0, Failures: 0, Skips: 0]
===============================================
[org.testng.TestNGException:]
[Cannot find class in classpath: testcase1]
at org.testng.xml.XmlClass.getSupportClass(XmlClass.java:55)
at org.testng.internal.Utils.xmlClassesToClasses(Utils.java:79)
at org.testng.TestRunner.initMethods(TestRunner.java:289)
at org.testng.TestRunner.init(TestRunner.java:235)
at org.testng.TestRunner.init(TestRunner.java:197)
at org.testng.TestRunner.(TestRunner.java:141)
at org.testng.SuiteRunner$DefaultTestRunnerFactory.newTestRunner(SuiteRunner.java:488)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:250)
at org.testng.SuiteRunner.run(SuiteRunner.java:204)
at org.testng.TestNG.createAndRunSuiteRunners(TestNG.java:877)
at org.testng.TestNG.runSuitesLocally(TestNG.java:842)
at org.testng.TestNG.run(TestNG.java:751)
at org.testng.TestNG.privateMain(TestNG.java:914)
at org.testng.TestNG.main(TestNG.java:887)
The tests failed.
This was run on a network server, I'd tested the testsuite.xml locally through intellij and everything works fine. I feel like this is a config issue with the network server, please let me know if my assumption is wrong and point me to the right direction to fix this issue.
Thanks.
You don't have your classes (tests & target classes) on the classpath.