Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 357660

Summary: JUnit failure: cdt.core testSharedDefaults
Product: [Tools] CDT Reporter: Andrew Gvozdev <angvoz.dev>
Component: cdt-coreAssignee: Andrew Gvozdev <angvoz.dev>
Status: RESOLVED FIXED QA Contact: Doug Schaefer <cdtdoug>
Severity: normal    
Priority: P3 CC: cdtdoug
Version: 8.0   
Target Milestone: 8.1.0   
Hardware: All   
OS: All   
Whiteboard:

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.