Permalink
Browse files

Fix AS7-3697 Make dependency info consistent with state info

  • Loading branch information...
1 parent b6d6cfe commit 51a5c0ffd00ad7666f349c7f57c8c1635fd6b911 @n1hility n1hility committed Jul 27, 2012
@@ -102,30 +102,29 @@ public void transition(final ServiceController<? extends Object> controller, fin
}
break;
}
+ case START_REQUESTED_to_PROBLEM: {
+ synchronized (this) {
+ servicesWithMissingDeps.add(controller);
+ }
+ break;
+ }
+ case PROBLEM_to_START_REQUESTED: {
+ synchronized (this) {
+ servicesWithMissingDeps.remove(controller);
+ }
+ break;
+ }
}
final ServiceController.Substate before = transition.getBefore();
final ServiceController.Substate after = transition.getAfter();
+
if (before.isRestState() && ! after.isRestState()) {
untick();
} else if (! before.isRestState() && after.isRestState()) {
tick();
}
}
- @Override
- public void immediateDependencyAvailable(final ServiceController<?> controller) {
- synchronized (this) {
- servicesWithMissingDeps.remove(controller);
- }
- }
-
- @Override
- public void immediateDependencyUnavailable(final ServiceController<?> controller) {
- synchronized (this) {
- servicesWithMissingDeps.add(controller);
- }
- }
-
void awaitUninterruptibly(int count) {
boolean intr = false;
try {
@@ -619,7 +619,6 @@ public void testRestartRequiredTxRollbackNonRecursive() throws Exception {
}
@Test
- // @Ignore("AS7-3697")
public void testRemoveDependentService() throws Exception {
ModelNode result = controller.execute(getOperation("dependent-service", "attr1", 5), null, null, null);
System.out.println(result);

0 comments on commit 51a5c0f

Please sign in to comment.