Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 328461 - [Log] The log mechanism is not compatible with JUnit tests
Summary: [Log] The log mechanism is not compatible with JUnit tests
Status: RESOLVED FIXED
Alias: None
Product: Papyrus
Classification: Modeling
Component: Core (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 minor (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-10-22 08:21 EDT by Cedric Dumoulin CLA
Modified: 2013-03-08 08:34 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 Cedric Dumoulin CLA 2010-10-22 08:21:45 EDT
The log mechanism require that the code is executed as a plugin.
Some JUnit tests should be run as Java code.
When running these tests as java code, they fail because some tested code contain call to log.

As a consequence, some JUnit tests can't be run.

Example of test that can't be run because of the log problem:
test/org.eclipse.papyrus.sasheditor.internal
Comment 1 Cedric Dumoulin CLA 2010-10-22 09:18:11 EDT
A workaround is created : The LogHelper class can be created without an associated plugin.
In the Activator, the LogHelper is always created. The plugin is associated later.

The org.eclipse.papyrus.sasheditor.Activator show how to change LogHelper creation.
Comment 2 Camille Letavernier CLA 2012-07-30 11:12:39 EDT
Most of the time, Papyrus is not designed to work outside of the Eclipse environment. There are many extension points, in both Papyrus and all its dependencies, which makes it really difficult to configure as a standalone product.

I don't think this task should be "critical", as long as tests can be ran as test plug-ins.
Comment 3 Camille Letavernier CLA 2012-08-23 06:07:58 EDT
Switching the severity to minor
Comment 4 Camille Letavernier CLA 2013-03-08 08:34:07 EST
I close the task, as I really think it shouldn't be necessary to run as java code.