Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Test and Performance Tools Platform (TPTP) » TestExecutionProcess calss and calling of postRun method
TestExecutionProcess calss and calling of postRun method [message #122973] Mon, 11 February 2008 14:45 Go to next message
Eclipse User
Originally posted by: josef.sevcik.tietoenator.com

Hi all,
I am using extension org.eclipse.hyades.test.core.launchconfigRunHandler
in our plugin project. My implementation of interface IRunHandler2 does
work properly only for preRun() and postLaunch() methods. But method
postRun() is not called. So I tried to debug where the problem is. I have
got to the Class
org.eclipse.hyades.test.core.internal.launch.processes.TestE xecutionProcess
and its constructor. There is a part of code:
synchronized (executor) {
if (executor.getState() == IExecutionComponent.DEAD) {
onTerminate();
} else {
this.executor.addExecutionComponentStateChangeListener(new
IExecutionComponentStateChangeListener() {
public void stateChanged(ExecutionComponentStateChangeEvent
newState) {
onTerminate();
}
});
}
}
postRun method shall be called in onTerminate() method if some conditions
are satisfied.

If I place brakepoint to line :
synchronized (executor) {
and debug the method step by step everything works fine.

So I placed breakpoint to line:
this.executor.addExecutionComponentStateChangeListener(new
IExecutionComponentStateChangeListener() {
and if I do chech the state of following condition -> if
(executor.getState() == IExecutionComponent.DEAD)
it is true.


My understanding of this behavior is that in time of evaluation of
condition executor.getState() is different from IExecutionComponent.DEAD
but in time when listener is added in else branch. State of executor is
already changed and that is why listener method stateChanged is never
called.

Do any have some experiences with this issue? Is it bug or do I something
wrong?
Re: TestExecutionProcess calss and calling of postRun method [message #124076 is a reply to message #122973] Mon, 25 February 2008 12:40 Go to previous message
Paul Slauenwhite is currently offline Paul Slauenwhite
Messages: 970
Registered: July 2009
Senior Member
Hi Josef,
This appears to be a defect in the code. Please open a Bugzilla against
the Test.Execution.Execution component:

https://bugs.eclipse.org/bugs/enter_bug.cgi?product=TPTP%20T esting

Paul
"Josef Sevcik" <josef.sevcik@tietoenator.com> wrote in message
news:92737a189abb95a5ac3cf5ba05d05fd0$1@www.eclipse.org...
> Hi all,
> I am using extension org.eclipse.hyades.test.core.launchconfigRunHandler
> in our plugin project. My implementation of interface IRunHandler2 does
> work properly only for preRun() and postLaunch() methods. But method
> postRun() is not called. So I tried to debug where the problem is. I have
> got to the Class
> org.eclipse.hyades.test.core.internal.launch.processes.TestE xecutionProcess
> and its constructor. There is a part of code: synchronized (executor) {
> if (executor.getState() == IExecutionComponent.DEAD) {
> onTerminate();
> } else {
> this.executor.addExecutionComponentStateChangeListener(new
> IExecutionComponentStateChangeListener() {
> public void stateChanged(ExecutionComponentStateChangeEvent newState) {
> onTerminate();
> }
> });
> }
> }
> postRun method shall be called in onTerminate() method if some conditions
> are satisfied.
>
> If I place brakepoint to line :
> synchronized (executor) {
> and debug the method step by step everything works fine.
> So I placed breakpoint to line:
> this.executor.addExecutionComponentStateChangeListener(new
> IExecutionComponentStateChangeListener() {
> and if I do chech the state of following condition -> if
> (executor.getState() == IExecutionComponent.DEAD)
> it is true.
>
>
> My understanding of this behavior is that in time of evaluation of
> condition executor.getState() is different from IExecutionComponent.DEAD
> but in time when listener is added in else branch. State of executor is
> already changed and that is why listener method stateChanged is never
> called.
>
> Do any have some experiences with this issue? Is it bug or do I something
> wrong?
>
Previous Topic:JUnit with MultiThread
Next Topic:TPTP auto. services : passing eclipse configuration and command line parameter :
Goto Forum:
  


Current Time: Fri Oct 24 11:40:20 GMT 2014

Powered by FUDForum. Page generated in 0.04060 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software