Jenkins Oyun 1.2.4 : cobertura lock dosyaları ile ilgili sorunlar / rapor
Oyun 1.2.4 bir uygulama var ve Jenkins (Ubuntu) uygulama var. Cobertura ile ilgili sorunlar yaşıyoruz.
Testleri (başarı) çalıştırdıktan sonra, her şimdi ve sonra, aşağıdaki hata alırız.
---------------------------------------
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at net.sourceforge.cobertura.util.FileLocker.lock(FileLocker.java:124)
at play.modules.cobertura.CoberturaPlugin$CoberturaPluginShutdownThread.run(Unknown Source)
Caused by: java.nio.channels.OverlappingFileLockException
at sun.nio.ch.FileChannelImpl$SharedFileLockTable.checkList(FileChannelImpl.java:1166)
at sun.nio.ch.FileChannelImpl$SharedFileLockTable.add(FileChannelImpl.java:1068)
at sun.nio.ch.FileChannelImpl.lock(FileChannelImpl.java:824)
at java.nio.channels.FileChannel.lock(FileChannel.java:860)
... 6 more
---------------------------------------
Unable to get lock on /var/lib/jenkins/jobs/project/workspace/cobertura.ser.lock: null
This is known to happen on Linux kernel 2.6.20.
Make sure cobertura.jar is in the root classpath of the jvm
process running the instrumented code. If the instrumented code
is running in a web server, this means cobertura.jar should be in
the web server's lib directory.
Don't put multiple copies of cobertura.jar in different WEB-INF/lib directories.
Only one classloader should load cobertura. It should be the root classloader.
---------------------------------------
lock file could not be deleted
Bu "inşa" ancak yapı daha aşağı, aşağıdaki cobertura raporları başarısız olmasına neden olan (). break gibi görünmüyor
Publishing Cobertura coverage report...
No coverage results were found using the pattern 'test-result/code-coverage/coverage.xml' relative to '/var/lib/jenkins/jobs/project/workspace'. Did you enter a pattern relative to the correct directory? Did you generate the XML report(s) for Cobertura?
Build step 'Publish Cobertura Coverage Report' changed build result to FAILURE
Bir sonraki çalışan el ile genellikle geçer inşa.
Zero code coverage with cobertura 1.9.2 but tests are working göre ayar denedim-Dcobertura.kullanın.java.=false niosonra oyun otomatik test komut.
Bu hata, yalnızca şimdi ve sonra olmuyormuş gibi, eğer bu yardım eğer tamamen emin değilim. Ama bundan sonra, otomatik test oyun ile ilgili bir sorun asılı bulduk:
...
Executing /opt/play-1.2.4/play auto-test "/var/lib/jenkins/jobs/project/workspace" -Dcobertura.use.java.nio=false
[workspace] $ /opt/play-1.2.4/play auto-test "/var/lib/jenkins/jobs/project/workspace" -Dcobertura.use.java.nio=false
<build stuck here for a couple of days>
Hiçbir şey tamamen deterministik beri, biraz zayiatlar hakkında söylemek zor. (Bu kurar sonra jenkins/sunucu yeniden başlatma) bir veya iki sonra ne gibi görünüyor
Şu anda projemiz, ama eğer birisi başka bir fikir varsa, bu harika olurdu=) Cobertura devre dışı bırakmayı düşünüyorum
CEVAP
İşin sırrı bir veri dosyası (cobertura.ser) başına paralel görevler kilitleri önlemek için modülü.
Karınca ile:
<cobertura-instrument todir="${build.dir}" datafile="cobertura.ser.${modulename}">
...
Sonunda cobertura birleştirme bir dosya içine birçok cobertura dosyaları:
<target name="merge-coverage">
<cobertura-merge datafile="cobertura.ser">
<fileset dir="${build.dir}">
<include name="cobertura.ser.*" />
</fileset>
</cobertura-merge>
</target>
JQuery getJSON Krom yerel dosyaları ku...
Lib-yoğun bakım Symfony 2.3 yüklerken ...
Çözülmemiş İthalat ve PyDev Eclipse il...
Android ile ilgili sorunlar Parçası yı...
PHP 5.3 ve seansları ile ilgili sorunl...