Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 299964 - Test log is missing events.
Summary: Test log is missing events.
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: TPTP (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P2 critical (vote)
Target Milestone: ---   Edit
Assignee: Paul Slauenwhite CLA
QA Contact: Kathy Chan CLA
URL:
Whiteboard: bvt
Keywords:
: 300258 (view as bug list)
Depends on:
Blocks: 151071 211751 302579
  Show dependency tree
 
Reported: 2010-01-18 12:09 EST by Paul Slauenwhite CLA
Modified: 2016-05-05 10:30 EDT (History)
2 users (show)

See Also:


Attachments
Sample Plug-in Projects. (12.30 KB, application/x-zip-compressed)
2010-01-18 12:09 EST, Paul Slauenwhite CLA
no flags Details
Sample Plug-in Project (10.25 KB, application/x-zip-compressed)
2010-01-28 12:27 EST, Paul Slauenwhite CLA
no flags Details
Patch. (9.02 KB, patch)
2010-01-29 10:47 EST, Paul Slauenwhite CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Paul Slauenwhite CLA 2010-01-18 12:09:46 EST
Created attachment 156412 [details]
Sample Plug-in Projects.

Test log is missing the first start event.

See the following test logs in the attached sample projects:

/javaproject/junittestsuite.execution
/pluginproj/junitplugintest.execution
Comment 1 Paul Slauenwhite CLA 2010-01-19 10:05:29 EST
Note, this symptom is not reproducible in TPTP 4.6.2.
Comment 2 Paul Slauenwhite CLA 2010-01-20 12:15:04 EST
Note, the symptom is only reproducible in the TPTP JUnit/Plug-in test type.  The AGR test type does not suffer from this symptom.
Comment 3 Paul Slauenwhite CLA 2010-01-28 12:27:52 EST
Created attachment 157541 [details]
Sample Plug-in Project
Comment 4 Paul Slauenwhite CLA 2010-01-28 12:30:21 EST
Note, this symptom is more severe since the hierarchy in the test log is not created.  For example, in /pluginproj/j2.execution the verdict event is referencing the 'j2' test suite and not the 'junitplugintest' test suite.
Comment 5 Paul Slauenwhite CLA 2010-01-28 14:03:01 EST
I have isolated the symptom down to missing test execution events.  The runner is emitting the correct events to the agent but they are not received by the XML loader (/org.eclipse.tptp.platform.models/src-test/org/eclipse/hyades/loaders/common/XMLexecutionEventLoader.java and /org.eclipse.tptp.platform.models.hierarchy/src-hierarchy/org/eclipse/hyades/loaders/util/XMLLoader.java).

In addition, the problem is with the IAC/AC since using a TPTP 4.6.2 AC resolves the symptom.
Comment 6 Paul Slauenwhite CLA 2010-01-28 14:41:04 EST
The root cause of this symptom is the Agent Controller configured/running the org.junit_4.8.1.v4_8_1_v20100114-1600 JUnit dependency, instead of the org.junit_3.8.2.v20090203-1005 JUnit dependency (packaged with the TPTP 4.7.0 Agent Controller).  

Work-around: Delete the org.junit_4.8.1.v4_8_1_v20100114-1600 JUnit dependency before configuring the Agent Controller.
Comment 7 Joel Cayne CLA 2010-01-28 14:52:47 EST
Updated org.eclipse.hyades.releng.builder/master/bash/add-dependencies.agntctrl.sh to only include the JUnit 3 dependency for packaging of the Agent Controller.
Comment 8 Paul Slauenwhite CLA 2010-01-29 10:18:53 EST
(In reply to comment #7)
> Updated
> org.eclipse.hyades.releng.builder/master/bash/add-dependencies.agntctrl.sh to
> only include the JUnit 3 dependency for packaging of the Agent Controller.

Joel will back out this change since the root cause of this symptom is a casting exception when calling the org.eclipse.hyades.test.common.junit.HyadesTestUtil.getTestListeners(TestResult) method.  In JUnit 4.8.x, the junit.framework.TestResult.fListeners property has changed from a Vector to a List, thereby causing the casting exception when resolving the junit.framework.TestResult.fListeners property through introspection (see org.eclipse.hyades.test.common.junit.HyadesTestUtil.getObjectFieldValue(Object, String)).  

The solution is to add a getter to org.eclipse.hyades.test.common.junit.HyadesTestResult to resolve the junit.framework.TestResult.fListeners property in the super class.  In addition, we will deprecate org.eclipse.hyades.test.common.junit.HyadesTestUtil.getObjectFieldValue(Object, String).
Comment 9 Joel Cayne CLA 2010-01-29 10:29:39 EST
(In reply to comment #8)
> Joel will back out this change since the root cause of this symptom is a
> casting exception when calling the
> org.eclipse.hyades.test.common.junit.HyadesTestUtil.getTestListeners(TestResult)
> method.

Change reverted.
Comment 10 Paul Slauenwhite CLA 2010-01-29 10:47:23 EST
Created attachment 157631 [details]
Patch.
Comment 11 Paul Slauenwhite CLA 2010-01-29 11:14:52 EST
Added two new test cases in the following test suites for TPTP JUnit/JUnit Plug-in tests:

/org.eclipse.hyades.test.java.tests/manual/regressionTests/Test.Execution.JUnitPluginRunner.testsuite

/org.eclipse.hyades.test.java.tests/manual/regressionTests/Test.Execution.JUnitRunner.testsuite
Comment 12 Paul Slauenwhite CLA 2010-02-03 08:49:25 EST
The attached patch checked in to CVS (HEAD).
Comment 13 Paul Slauenwhite CLA 2010-02-03 08:50:57 EST
*** Bug 300258 has been marked as a duplicate of this bug. ***
Comment 14 Paul Slauenwhite CLA 2010-02-11 08:52:43 EST
Verified in TPTP-4.7.0-201002101900 for TPTP JUnit tests. See https://bugs.eclipse.org/bugs/show_bug.cgi?id=302579 for a new issue with the TPTP JUnit Plug-in tests.