diff options
author | eutarass | 2009-05-14 20:44:04 +0000 |
---|---|---|
committer | eutarass | 2009-05-14 20:44:04 +0000 |
commit | f3e47479ac76f6051a892ef2d479b04858d4c99e (patch) | |
tree | 157850e2d1fe6ee8ce7da882185d54a2f43c6184 /plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/TestSysMonitor.java | |
parent | fe5aa65dce717b63dd441e138c87b215697fdbe9 (diff) | |
download | org.eclipse.tcf-f3e47479ac76f6051a892ef2d479b04858d4c99e.tar.gz org.eclipse.tcf-f3e47479ac76f6051a892ef2d479b04858d4c99e.tar.xz org.eclipse.tcf-f3e47479ac76f6051a892ef2d479b04858d4c99e.zip |
Fixed: SysMonitor service tests fail if agent user account is not root.
Diffstat (limited to 'plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/TestSysMonitor.java')
-rw-r--r-- | plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/TestSysMonitor.java | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/TestSysMonitor.java b/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/TestSysMonitor.java index 8d100adc0..09985831b 100644 --- a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/TestSysMonitor.java +++ b/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/TestSysMonitor.java @@ -4,6 +4,7 @@ import java.util.HashMap; import java.util.HashSet; import org.eclipse.tm.tcf.protocol.IChannel; +import org.eclipse.tm.tcf.protocol.IErrorReport; import org.eclipse.tm.tcf.protocol.IToken; import org.eclipse.tm.tcf.services.ISysMonitor; import org.eclipse.tm.tcf.services.ISysMonitor.SysMonitorContext; @@ -41,6 +42,10 @@ class TestSysMonitor implements ITCFTest { cmds.remove(token); if (error != null) { // Some errors are expected, like "Access Denied" + if (!(error instanceof IErrorReport)) { + exit(error); + return; + } } else { procs.put(id, context); @@ -62,11 +67,13 @@ class TestSysMonitor implements ITCFTest { public void doneGetEnvironment(IToken token, Exception error, String[] environment) { cmds.remove(token); if (error != null) { - exit(error); - } - else { - if (cmds.isEmpty()) getCommandLine(); + // Some errors are expected, like "Access Denied" + if (!(error instanceof IErrorReport)) { + exit(error); + return; + } } + if (cmds.isEmpty()) getCommandLine(); } })); } @@ -79,11 +86,13 @@ class TestSysMonitor implements ITCFTest { public void doneGetCommandLine(IToken token, Exception error, String[] cmd_line) { cmds.remove(token); if (error != null) { - exit(error); - } - else { - if (cmds.isEmpty()) exit(null); + // Some errors are expected, like "Access Denied" + if (!(error instanceof IErrorReport)) { + exit(error); + return; + } } + if (cmds.isEmpty()) exit(null); } })); } |