[jboss-cvs] JBossAS SVN: r65327 - in trunk/system-jmx/src: tests/org/jboss/test/system/controller and 1 other directory.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Wed Sep 12 07:32:08 EDT 2007
Author: adrian at jboss.org
Date: 2007-09-12 07:32:07 -0400 (Wed, 12 Sep 2007)
New Revision: 65327
Modified:
trunk/system-jmx/src/main/org/jboss/system/ServiceContext.java
trunk/system-jmx/src/tests/org/jboss/test/system/controller/ControllerTestDelegate.java
Log:
Problem should be public in ServiceContext
Modified: trunk/system-jmx/src/main/org/jboss/system/ServiceContext.java
===================================================================
--- trunk/system-jmx/src/main/org/jboss/system/ServiceContext.java 2007-09-12 10:49:11 UTC (rev 65326)
+++ trunk/system-jmx/src/main/org/jboss/system/ServiceContext.java 2007-09-12 11:32:07 UTC (rev 65327)
@@ -81,7 +81,7 @@
public transient Service proxy;
/** Cause for failure */
- private Throwable problem;
+ public Throwable problem;
public String getStateString()
{
Modified: trunk/system-jmx/src/tests/org/jboss/test/system/controller/ControllerTestDelegate.java
===================================================================
--- trunk/system-jmx/src/tests/org/jboss/test/system/controller/ControllerTestDelegate.java 2007-09-12 10:49:11 UTC (rev 65326)
+++ trunk/system-jmx/src/tests/org/jboss/test/system/controller/ControllerTestDelegate.java 2007-09-12 11:32:07 UTC (rev 65327)
@@ -266,20 +266,25 @@
ServiceContext ctx = (ServiceContext) i.next();
if (name.equals(ctx.objectName))
{
+ Throwable problem = ctx.getProblem();
if (e != null || expected != null)
{
- if (expected != null && ctx.problem == null)
+ if (expected != null && problem == null)
throw new AssertionFailedError("Did not get expected " + expected.getName() + " for " + ctx);
- if (expected == null && ctx.problem != null)
+ if (expected == null && problem != null)
{
- if (ctx.problem instanceof Exception)
- throw (Exception) ctx.problem;
- if (ctx.problem instanceof Error)
- throw (Error) ctx.problem;
- throw new UndeclaredThrowableException(ctx.problem);
+ if (problem instanceof Exception)
+ throw (Exception) problem;
+ if (problem instanceof Error)
+ throw (Error) problem;
+ throw new UndeclaredThrowableException(problem);
}
if (expected != null)
- AbstractSystemTest.checkThrowableDeep(expected, ctx.problem);
+ {
+ AbstractSystemTest.checkThrowableDeep(expected, problem);
+ if (ServiceContext.FAILED != ctx.state)
+ throw new AssertionFailedError("Context is not in the FAILED state: " + ctx);
+ }
}
return;
}
More information about the jboss-cvs-commits
mailing list