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

Bug 328461

Summary: [Log] The log mechanism is not compatible with JUnit tests
Product: [Modeling] Papyrus Reporter: Cedric Dumoulin <cedric.dumoulin>
Component: CoreAssignee: Project Inbox <mdt-papyrus-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: minor    
Priority: P3 CC: cletavernier
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

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.