Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 357660 - JUnit failure: cdt.core testSharedDefaults
Summary: JUnit failure: cdt.core testSharedDefaults
Status: RESOLVED FIXED
Alias: None
Product: CDT
Classification: Tools
Component: cdt-core (show other bugs)
Version: 8.0   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 8.1.0   Edit
Assignee: Andrew Gvozdev CLA
QA Contact: Doug Schaefer CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-14 12:58 EDT by Andrew Gvozdev CLA
Modified: 2012-02-23 11:33 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Gvozdev CLA 2011-09-14 12:58:30 EDT
I looked at that and the assert just counts messages in the log. Basically, it is saying "It always was that way that there is an error in the log but now there is no error in the log anymore so we fail the test".
A comment in the code clarifies the reason: "// when running the testcase in head-less mode, the  TestExtraPagesProvider class cannot be loaded".

I think we can just remove this assert, I suppose TestExtraPagesProvider can be loaded if UI plugin is activated in maven build.

testSharedDefaults(org.eclipse.cdt.core.tests.templateengine.TestTemplateEngine)  Time elapsed: 0.284 sec  <<< FAILURE!
junit.framework.AssertionFailedError: Expected number (1) of non-OK status objects differs from actual (0).
Comment 1 Andrew Gvozdev CLA 2011-09-14 13:28:35 EDT
Fixed on master.
Comment 2 CDT Genie CLA 2011-09-14 14:23:05 EDT
*** cdt git genie on behalf of Andrew Gvozdev ***

    bug 357660: JUnit failure: cdt.core testSharedDefaults

[*] http://git.eclipse.org/c/cdt/org.eclipse.cdt.git/commit/?id=5ce8c116028fee3fe159fb1cf52a91f3ef5dc2cc
Comment 3 Doug Schaefer CLA 2011-09-14 14:33:55 EDT
Not sure of this one. We shouldn't be requiring the UI to be loaded during core tests. It points out a problem in the architecture. The UI needs to be an optional component since it may need to be replaced some day.
Comment 4 Andrew Gvozdev CLA 2011-09-14 14:43:40 EDT
(In reply to comment #3)
> Not sure of this one. We shouldn't be requiring the UI to be loaded during core
> tests. It points out a problem in the architecture. The UI needs to be an
> optional component since it may need to be replaced some day.
I agree with you in principle but isn't it the same as bug 357633 where cdt.managedbuilder.core tests depend on cdt.managedbuilder.ui plugin?
Comment 5 Doug Schaefer CLA 2011-09-14 14:45:09 EDT
(In reply to comment #4)
> (In reply to comment #3)
> > Not sure of this one. We shouldn't be requiring the UI to be loaded during core
> > tests. It points out a problem in the architecture. The UI needs to be an
> > optional component since it may need to be replaced some day.
> I agree with you in principle but isn't it the same as bug 357633 where
> cdt.managedbuilder.core tests depend on cdt.managedbuilder.ui plugin?

Yes, that crossed my mind too. At the moment, I just want a clear build so principle will have to wait.