You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@karaf.apache.org by "Andreas Pieber (JIRA)" <ji...@apache.org> on 2013/02/01 13:40:14 UTC
[jira] [Resolved] (KARAF-2144) MainStartTest test fails when
methods are executed in reverse order
[ https://issues.apache.org/jira/browse/KARAF-2144?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Andreas Pieber resolved KARAF-2144.
-----------------------------------
Resolution: Fixed
{code}
Committing to https://svn.apache.org/repos/asf/karaf/trunk ...
M main/src/test/java/org/apache/karaf/main/MainStartTest.java
Committed r1441425
{code}
> MainStartTest test fails when methods are executed in reverse order
> -------------------------------------------------------------------
>
> Key: KARAF-2144
> URL: https://issues.apache.org/jira/browse/KARAF-2144
> Project: Karaf
> Issue Type: Bug
> Components: karaf-core
> Affects Versions: 3.0.0
> Environment: java version "1.7.0_09"
> OpenJDK Runtime Environment (IcedTea7 2.3.4) (ArchLinux build 7.u9_2.3.4-1-x86_64)
> OpenJDK 64-Bit Server VM (build 23.2-b09, mixed mode)
> Reporter: Christoph Gritschenberger
> Assignee: Andreas Pieber
> Priority: Minor
> Fix For: 3.0.0
>
> Attachments: test-fix.patch
>
>
> Sometimes I get spammed with this Exception when building karaf
> {code}
> Jan 27, 2013 2:56:20 AM org.apache.karaf.main.lock.SimpleFileLock lock
> INFO: Trying to lock /home/christoph/oss/karaf/main/target/test-classes/test-karaf-home/lock
> java.nio.channels.OverlappingFileLockException
> at sun.nio.ch.SharedFileLockTable.checkList(FileLockTable.java:255)
> at sun.nio.ch.SharedFileLockTable.add(FileLockTable.java:152)
> at sun.nio.ch.FileChannelImpl.tryLock(FileChannelImpl.java:1017)
> at java.nio.channels.FileChannel.tryLock(FileChannel.java:1154)
> at org.apache.karaf.main.lock.SimpleFileLock.lock(SimpleFileLock.java:63)
> at org.apache.karaf.main.lock.LockManager.runLockManager(LockManager.java:61)
> at org.apache.karaf.main.lock.LockManager.access$000(LockManager.java:21)
> at org.apache.karaf.main.lock.LockManager$1.run(LockManager.java:49)
> {code}
> In Java 7 the reflection-implementation was changed so that tests in the same test-class are not necessarily executed in the same order they are written. Changing the order of the tests and using JDK-6 makes this issue 100% reproducible for me.
> This may cause the Tests in MainStartTest to be executed in reverse order, which will cause "testAutoStart" to fail because "testStopWithTimeout" did not clean up correctly.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira