[419182] Address JUnit failure in
org.eclipse.jst.server.tomcat.core.tests
diff --git a/tests/org.eclipse.jst.server.tomcat.core.tests/.gitignore b/tests/org.eclipse.jst.server.tomcat.core.tests/.gitignore
new file mode 100644
index 0000000..5e56e04
--- /dev/null
+++ b/tests/org.eclipse.jst.server.tomcat.core.tests/.gitignore
@@ -0,0 +1 @@
+/bin
diff --git a/tests/org.eclipse.jst.server.tomcat.core.tests/META-INF/MANIFEST.MF b/tests/org.eclipse.jst.server.tomcat.core.tests/META-INF/MANIFEST.MF
index 219e8bd..41d8ef5 100644
--- a/tests/org.eclipse.jst.server.tomcat.core.tests/META-INF/MANIFEST.MF
+++ b/tests/org.eclipse.jst.server.tomcat.core.tests/META-INF/MANIFEST.MF
@@ -21,6 +21,7 @@
  org.eclipse.jst.j2ee,
  org.eclipse.jdt.launching,
  org.eclipse.core.resources,
- org.eclipse.jst.server.core
+ org.eclipse.jst.server.core,
+ org.eclipse.debug.ui
 Eclipse-LazyStart: true
 Bundle-RequiredExecutionEnvironment: J2SE-1.4
diff --git a/tests/org.eclipse.jst.server.tomcat.core.tests/src/org/eclipse/jst/server/tomcat/core/tests/AbstractTomcatServerTestCase.java b/tests/org.eclipse.jst.server.tomcat.core.tests/src/org/eclipse/jst/server/tomcat/core/tests/AbstractTomcatServerTestCase.java
index 9c41ccd..15bcbb9 100644
--- a/tests/org.eclipse.jst.server.tomcat.core.tests/src/org/eclipse/jst/server/tomcat/core/tests/AbstractTomcatServerTestCase.java
+++ b/tests/org.eclipse.jst.server.tomcat.core.tests/src/org/eclipse/jst/server/tomcat/core/tests/AbstractTomcatServerTestCase.java
@@ -18,6 +18,7 @@
 import org.eclipse.core.runtime.IPath;
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.Path;
+import org.eclipse.debug.internal.ui.DebugUIPlugin;
 import org.eclipse.jst.server.tomcat.core.internal.ITomcatConfigurationWorkingCopy;
 import org.eclipse.jst.server.tomcat.core.internal.ITomcatServerWorkingCopy;
 import org.eclipse.jst.server.tomcat.core.internal.TomcatServer;
@@ -37,6 +38,17 @@
 import org.eclipse.wst.server.core.tests.ext.AbstractServerTestCase;
 
 public abstract class AbstractTomcatServerTestCase extends AbstractServerTestCase {
+	// See Bug 419182: Due to lazy loading, launching Tomcat in a JUnit test can cause
+	// the DebugUIPlugin to load and initialize on the job thread that will try to
+	// start Tomcat.  There is a risk that in some environments that initialization
+	// of the DebugUIPlugin may invoke some initialization that is required to
+	// run in the main/UI thread. The exception that gets throw can cause Tomcat
+	// not to start, resulting in test failures.  The following code forces the
+	// DebugUIPlugin to load and initialize on the thread loading this test plug-in,
+	// rather than taking the risk of loading it on the job thread when Tomcat is
+	// launched.
+	protected static boolean workaround = DebugUIPlugin.DEBUG; // Access something in DebugUIPlugin;
+
 	protected abstract String getServerTypeId();
 	
 	public void deleteServer(IServer server2) throws Exception {