[
https://issues.jboss.org/browse/TEIIDDES-802?page=com.atlassian.jira.plug...
]
Paul Richardson resolved TEIIDDES-802.
--------------------------------------
Resolution: Done
powermock removed from codebase and tests run using junit and mockito.
Code refactored to avoid the need to mock statics
Tests Using PowerMock Fail When Running Tycho Build
---------------------------------------------------
Key: TEIIDDES-802
URL:
https://issues.jboss.org/browse/TEIIDDES-802
Project: Teiid Designer
Issue Type: Task
Components: Build
Affects Versions: 7.1
Reporter: Dan Florian
Assignee: Paul Richardson
Fix For: Pre-8.0
The tests in the projects that use PowerMock are not being run during the nightly build.
The following projects use PowerMock:
1. org.teiid.designer.core.test
2. org.teiid.designer.ddl.importer.test
3. org.teiid.designer.dqp.test
4. org.teiid.designer.vdb.test
Once the problem is fixed, references to these projects need to be uncommented in the
tests/pom.xml and in org.teiid.designer.tests.feature/feature.xml so that their tests will
be run in the nightly build.
I've investigated using the PowerMockRule instead of @RunWith( PowerMockRunner.class
) in the test. In the pom.xml, I've tried adding dependencies to PowerMock and also
dependencies to the maven-osgi-test-plugin to PowerMock. Didn't have any luck with
anything I've tried so far.
In the root directory of one of the above projects execute the following command to run a
local build and run tests of that one project:
mvn3 clean install -B -fae -e -P helios-remote-target -X
Here are some example pom.xml code that I have tried:
<build>
<plugin>
<groupId>org.sonatype.tycho</groupId>
<artifactId>maven-osgi-test-plugin</artifactId>
<version>${tychoVersion}</version>
<dependencies>
<dependency>
<groupId>org.jboss.tools</groupId>
<artifactId>org.powermock.osgi</artifactId>
<version>1.4.7</version>
</dependency>
</dependencies>
</plugin>
</build>
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see:
http://www.atlassian.com/software/jira