Skip to content

Commit

Permalink
Correction for deadlocked CT test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
nickbattle authored and joey-coleman committed Sep 27, 2013
1 parent 1a70398 commit 92156fd
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
import org.overturetool.vdmj.Settings;
import org.overturetool.vdmj.commands.DebuggerReader;
import org.overturetool.vdmj.lex.LexLocation;
import org.overturetool.vdmj.messages.Console;
import org.overturetool.vdmj.runtime.Context;
import org.overturetool.vdmj.runtime.ContextException;
import org.overturetool.vdmj.statements.Statement;
Expand Down Expand Up @@ -161,16 +160,19 @@ public void body()
}
catch (Throwable e)
{
if (getException() != null)
if (result.lastIndexOf(Verdict.FAILED) < 0)
{
result.add(getException());
}
else
{
result.add(e.getMessage());
if (getException() != null)
{
result.add(getException());
}
else
{
result.add(e.getMessage());
}

result.add(Verdict.FAILED);
}

result.add(Verdict.FAILED);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ public void start(MainThread main)
{
try
{
Thread.sleep(500);
Thread.sleep(100);
}
catch (InterruptedException e)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,16 @@ protected void beforeExecute(Thread t, Runnable r)
}

}

@Override
protected void afterExecute(Runnable r, Throwable t)
{
if (r instanceof SchedulablePoolThread)
{
SchedulablePoolThread spt = (SchedulablePoolThread) r;
spt.setThread(null);
}
}

/**
* Prints an error message if a execution is rejected
Expand Down Expand Up @@ -464,7 +474,7 @@ public boolean isActive()
{
return state == RunState.TIMESTEP || state == RunState.WAITING;
}

/* (non-Javadoc)
* @see org.overturetool.vdmj.scheduler.ISchedulableThread#isVirtual()
*/
Expand Down

0 comments on commit 92156fd

Please sign in to comment.