Bug 814697

Summary: Hibernate Search sources contains unit tests which cannot be compiled
Product: [Retired] JBoss Enterprise WFK Platform 2 Reporter: Karel Piwko <kpiwko>
Component: HibernateSearchAssignee: Strong Liu <stliu>
Status: CLOSED CURRENTRELEASE QA Contact: Karel Piwko <kpiwko>
Severity: medium Docs Contact:
Priority: medium    
Version: 2.0.0.ER4CC: sjacobs
Target Milestone: ---   
Target Release: 2.0.0.ER5   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-06-22 07:32:29 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Karel Piwko 2012-04-20 13:01:39 UTC
Description of problem:

ER4 sources distribution for Hibernate Search cannot be compiled even when EAP, WFK and EAP6 repository is activated.

Version-Release number of selected component (if applicable):


How reproducible:

Always.

Steps to Reproduce:
1. Download ER4 src distribution http://download.devel.redhat.com/devel/candidates/JBWFK/2.0.0.ER4/jboss-wfk-2.0.0.ER4-hibernate-search-project.zip

2. Unpack it
3. Try to execute tests via `mvn clean test`
  
Actual results:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2-redhat-1:testCompile (default-testCompile) on project hibernate-search-engine: Compilation failure: Compilation failure:
[ERROR] /home/kpiwko/installations/wfk/2.0.0.ER4/hibernate-search-4.1.0.Final-redhat-1/hibernate-search-engine/src/test/java/org/hibernate/search/test/backends/jgroups/JGroupsConfigurationTest.java:[30,16] package org.junit does not exist
[ERROR] /home/kpiwko/installations/wfk/2.0.0.ER4/hibernate-search-4.1.0.Final-redhat-1/hibernate-search-engine/src/test/java/org/hibernate/search/test/backends/jgroups/JGroupsConfigurationTest.java:[31,16] package org.junit does not exist
[ERROR] /home/kpiwko/installations/wfk/2.0.0.ER4/hibernate-search-4.1.0.Final-redhat-1/hibernate-search-engine/src/test/java/org/hibernate/search/test/backends/jgroups/JGroupsConfigurationTest.java:[32,22] package org.junit.rules does not exist
[ERROR] /home/kpiwko/installations/wfk/2.0.0.ER4/hibernate-search-4.1.0.Final-redhat-1/hibernate-search-engine/src/test/java/org/hibernate/search/test/backends/jgroups/JGroupsConfigurationTest.java:[44,8] cannot find symbol
[ERROR] symbol  : class ExpectedException
[ERROR] location: class org.hibernate.search.test.backends.jgroups.JGroupsConfigurationTest
[ERROR] /home/kpiwko/installations/wfk/2.0.0.ER4/hibernate-search-4.1.0.Final-redhat-1/hibernate-search-engine/src/test/java/org/hibernate/search/test/configuration/OptimizerStrategyLoadTest.java:[25,22] package junit.framework does not exist
[ERROR] /home/kpiwko/installations/wfk/2.0.0.ER4/hibernate-search-4.1.0.Final-redhat-1/hibernate-search-engine/src/test/java/org/hibernate/search/test/configuration/OptimizerStrategyLoadTest.java:[37,16] package org.junit does not exist
[ERROR] /home/kpiwko/installations/wfk/2.0.0.ER4/hibernate-search-4.1.0.Final-redhat-1/hibernate-search-engine/src/test/java/org/hibernate/search/test/util/BytemanHelper.java:[24,29] package org.jboss.byteman.rule does not exist
[ERROR] /home/kpiwko/installations/wfk/2.0.0.ER4/hibernate-search-4.1.0.Final-redhat-1/hibernate-search-engine/src/test/java/org/hibernate/search/test/util/BytemanHelper.java:[25,36] package org.jboss.byteman.rule.helper does not exist
[ERROR] /home/kpiwko/installations/wfk/2.0.0.ER4/hibernate-search-4.1.0.Final-redhat-1/hibernate-search-engine/src/test/java/org/hibernate/search/test/util/BytemanHelper.java:[34,35] cannot find symbol
[ERROR] symbol: class Helper
[ERROR] public class BytemanHelper extends Helper {
[ERROR] /home/kpiwko/installations/wfk/2.0.0.ER4/hibernate-search-4.1.0.Final-redhat-1/hibernate-search-engine/src/test/java/org/hibernate/search/test/util/BytemanHelper.java:[39,25] cannot find symbol
[ERROR] symbol  : class Rule
[ERROR] location: class org.hibernate.search.test.util.BytemanHelper
[ERROR] /home/kpiwko/installations/wfk/2.0.0.ER4/hibernate-search-4.1.0.Final-redhat-1/hibernate-search-engine/src/test/java/org/hibernate/search/test/util/FieldSelectorLeakingReaderProvider.java:[48,29] package junit.framework does not exist
[ERROR] /home/kpiwko/installations/wfk/2.0.0.ER4/hibernate-search-4.1.0.Final-redhat-1/hibernate-search-engine/src/test/java/org/hibernate/search/test/configuration/TransactionsExpectedTest.java:[25,22] package junit.framework does not exist
[ERROR] /home/kpiwko/installations/wfk/2.0.0.ER4/hibernate-search-4.1.0.Final-redhat-1/hibernate-search-engine/src/test/java/org/hibernate/search/test/configuration/TransactionsExpectedTest.java:[34,16] package org.junit does not exist
[ERROR] /home/kpiwko/installations/wfk/2.0.0.ER4/hibernate-search-4.1.0.Final-redhat-1/hibernate-search-engine/src/test/java/org/hibernate/search/test/configuration/IndexMetadataCompleteConfiguredTest.java:[37,16] package org.junit does not exist
[ERROR] /home/kpiwko/installations/wfk/2.0.0.ER4/hibernate-search-4.1.0.Final-redhat-1/hibernate-search-engine/src/test/java/org/hibernate/search/test/configuration/IndexMetadataCompleteConfiguredTest.java:[39,29] package junit.framework does not exist
[ERROR] /home/kpiwko/installations/wfk/2.0.0.ER4/hibernate-search-4.1.0.Final-redhat-1/hibernate-search-engine/src/test/java/org/hibernate/search/test/configuration/IndexMetadataCompleteConfiguredTest.java:[39,0] static import only from classes and interfaces
[ERROR] /home/kpiwko/installations/wfk/2.0.0.ER4/hibernate-search-4.1.0.Final-redhat-1/hibernate-search-engine/src/test/java/org/hibernate/search/test/util/ResourceLoadingTest.java:[26,16] package org.junit does not exist
[ERROR] /home/kpiwko/installations/wfk/2.0.0.ER4/hibernate-search-4.1.0.Final-redhat-1/hibernate-search-engine/src/test/java/org/hibernate/search/test/util/ResourceLoadingTest.java:[32,29] package junit.framework does not exist
[ERROR] /home/kpiwko/installations/wfk/2.0.0.ER4/hibernate-search-4.1.0.Final-redhat-1/hibernate-search-engine/src/test/java/org/hibernate/search/test/util/ResourceLoadingTest.java:[32,0] static import only from classes and interfaces
[ERROR] /home/kpiwko/installations/wfk/2.0.0.ER4/hibernate-search-4.1.0.Final-redhat-1/hibernate-search-engine/src/test/java/org/hibernate/search/test/util/ResourceLoadingTest.java:[33,29] package junit.framework does not exist
[ERROR] /home/kpiwko/installations/wfk/2.0.0.ER4/hibernate-search-4.1.0.Final-redhat-1/hibernate-search-engine/src/test/java/org/hibernate/search/test/util/ResourceLoadingTest.java:[33,0] static import only from classes and interfaces
[ERROR] /home/kpiwko/installations/wfk/2.0.0.ER4/hibernate-search-4.1.0.Final-redhat-1/hibernate-search-engine/src/test/java/org/hibernate/search/test/util/ResourceLoadingTest.java:[34,29] package junit.framework does not exist
[ERROR] /home/kpiwko/installations/wfk/2.0.0.ER4/hibernate-search-4.1.0.Final-redhat-1/hibernate-search-engine/src/test/java/org/hibernate/search/test/util/ResourceLoadingTest.java:[34,0] static import only from classes and interfaces
[ERROR] /home/kpiwko/installations/wfk/2.0.0.ER4/hibernate-search-4.1.0.Final-redhat-1/hibernate-search-engine/src/test/java/org/hibernate/search/test/programmaticmapping/MutatingSearchFactoryTest.java:[25,22] package junit.framework does not exist
[ERROR] /home/kpiwko/installations/wfk/2.0.0.ER4/hibernate-search-4.1.0.Final-redhat-1/hibernate-search-engine/src/test/java/org/hibernate/search/test/programmaticmapping/MutatingSearchFactoryTest.java:[31,16] package org.junit does not exist
[ERROR] /home/kpiwko/installations/wfk/2.0.0.ER4/hibernate-search-4.1.0.Final-redhat-1/hibernate-search-engine/src/test/java/org/hibernate/search/test/programmaticmapping/MutatingSearchFactoryTest.java:[32,16] package org.junit does not exist
[ERROR] /home/kpiwko/installations/wfk/2.0.0.ER4/hibernate-search-4.1.0.Final-redhat-1/hibernate-search-engine/src/test/java/org/hibernate/search/test/programmaticmapping/TestingSearchFactoryHolder.java:[27,22] package org.junit.rules does not exist
[ERROR] /home/kpiwko/installations/wfk/2.0.0.ER4/hibernate-search-4.1.0.Final-redhat-1/hibernate-search-engine/src/test/java/org/hibernate/search/test/programmaticmapping/TestingSearchFactoryHolder.java:[35,48] cannot find symbol
[ERROR] symbol: class ExternalResource
[ERROR] public class TestingSearchFactoryHolder extends ExternalResource {
[ERROR] /home/kpiwko/installations/wfk/2.0.0.ER4/hibernate-search-4.1.0.Final-redhat-1/hibernate-search-engine/src/test/java/org/hibernate/search/test/backends/BackendQueueProcessorTest.java:[23,16] package org.junit does not exist
[ERROR] /home/kpiwko/installations/wfk/2.0.0.ER4/hibernate-search-4.1.0.Final-redhat-1/hibernate-search-engine/src/test/java/org/hibernate/search/test/util/FileHelperTest.java:[34,16] package org.junit does not exist

...

Expected results:

Compilation passes.

Additional info:

Test dependencies are removed during build. See https://bugzilla.redhat.com/show_bug.cgi?id=802383 for workaround needed.

Comment 1 Strong Liu 2012-04-25 04:29:01 UTC
is this a ERD/PRD requirement? the shipped source must be compilable as well as test?

or just QA can't compile the test?

Comment 3 Strong Liu 2012-05-07 13:15:31 UTC
I have removed the test sources in ER5, so I think this is not an issue anymore

Comment 4 Karel Piwko 2012-05-10 08:16:39 UTC
Verified compilation via `mvn clean package` in ER5, using EAP6, WFK2 and EAP6-plugins repositories.