summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKrzysztof Daniel2013-11-07 02:39:51 (EST)
committerKrzysztof Daniel2013-11-12 09:17:58 (EST)
commitf8c80a1e830881cc38f85dde47f2a688d9b777b2 (patch)
tree63737a49364a956557c887eaba2e5af8cca1abee
parent8b9149efcc8f8cbddcecfb491ff6e6168fbf61ec (diff)
downloadrt.equinox.p2-f8c80a1e830881cc38f85dde47f2a688d9b777b2.zip
rt.equinox.p2-f8c80a1e830881cc38f85dde47f2a688d9b777b2.tar.gz
rt.equinox.p2-f8c80a1e830881cc38f85dde47f2a688d9b777b2.tar.bz2
Revert "bug 420260: org.eclipse.equinox.p2.tests take 1.5h longer on therefs/changes/62/18162/2
Mac " This reverts commit 8c9187a7cdfca9ae0c93566c5f383a6c7e6137bf, as it was released only for instrumentation. Signed-off-by: Krzysztof Daniel <kdaniel@redhat.com> Change-Id: I5ca7c147d8434b3a72b84d38953817ff541b9066
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/TestTimeoutDump.java53
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/CompositeArtifactRepositoryTest.java6
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/metadata/repository/CompositeMetadataRepositoryTest.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/mirror/ArtifactMirrorApplicationTest.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/mirror/MetadataMirrorApplicationTest.java3
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/mirror/NewMirrorApplicationArtifactTest.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/mirror/NewMirrorApplicationMetadataTest.java3
7 files changed, 1 insertions, 70 deletions
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/TestTimeoutDump.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/TestTimeoutDump.java
deleted file mode 100644
index 6ee32cd..0000000
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/TestTimeoutDump.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2013 IBM Corporation and others. All rights reserved. This
- * program and the accompanying materials are made available under the terms of
- * the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: IBM Corporation, Markus Keller - initial API and implementation
- ******************************************************************************/
-package org.eclipse.equinox.p2.tests;
-
-import java.text.SimpleDateFormat;
-import java.util.*;
-import junit.framework.TestCase;
-
-public class TestTimeoutDump {
- static String fgName;
- static int fgTimeoutSeconds;
- static Thread fgTimer;
-
- public static void setUp(TestCase testCase, int timeoutSeconds) {
- fgName = testCase.getClass().getName() + "#" + testCase.getName();
- fgTimeoutSeconds = timeoutSeconds;
- fgTimer = new Thread() {
- @Override
- public void run() {
- try {
- Thread.sleep(fgTimeoutSeconds * 1000);
- } catch (InterruptedException e) {
- fgTimer = null;
- return;
- }
- System.err.println("Thread dump " + fgName + " at " + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss Z", Locale.US).format(new Date()) + ":");
- Map<Thread, StackTraceElement[]> s = Thread.getAllStackTraces();
- for (Map.Entry<Thread, StackTraceElement[]> entry : s.entrySet()) {
- String name = entry.getKey().getName();
- StackTraceElement[] stack = entry.getValue();
- Exception exception = new Exception(name);
- exception.setStackTrace(stack);
- exception.printStackTrace();
- }
- System.err.flush();
- fgTimer = null;
- }
- };
- fgTimer.start();
- }
-
- public static void tearDown() {
- if (fgTimer != null) {
- fgTimer.interrupt();
- }
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/CompositeArtifactRepositoryTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/CompositeArtifactRepositoryTest.java
index cd4c954..0e329b7 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/CompositeArtifactRepositoryTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/CompositeArtifactRepositoryTest.java
@@ -52,7 +52,6 @@ public class CompositeArtifactRepositoryTest extends AbstractProvisioningTest {
protected void tearDown() throws Exception {
super.tearDown();
- TestTimeoutDump.tearDown();
//repository location is not used by all tests
if (repositoryURI != null) {
getArtifactRepositoryManager().removeRepository(repositoryURI);
@@ -64,11 +63,6 @@ public class CompositeArtifactRepositoryTest extends AbstractProvisioningTest {
}
}
- protected void setUp() throws Exception {
- TestTimeoutDump.setUp(this, 60);
- super.setUp();
- }
-
public void testCompressedRepositoryCreation() {
//create a compressed repo
createRepo(true);
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/metadata/repository/CompositeMetadataRepositoryTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/metadata/repository/CompositeMetadataRepositoryTest.java
index d16f5da..d5e4c61 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/metadata/repository/CompositeMetadataRepositoryTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/metadata/repository/CompositeMetadataRepositoryTest.java
@@ -588,7 +588,7 @@ public class CompositeMetadataRepositoryTest extends AbstractProvisioningTest {
public void testNonLocalRepo() {
PrintStream out = System.out;
try {
- // System.setOut(new PrintStream(new StringBufferStream()));
+ System.setOut(new PrintStream(new StringBufferStream()));
URI location = new URI("http://eclipse.org/equinox/in/memory");
URI childOne = new URI("http://eclipse.org/equinox/in/memory/one");
URI childTwo = new URI("http://eclipse.org/equinox/in/memory/two");
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/mirror/ArtifactMirrorApplicationTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/mirror/ArtifactMirrorApplicationTest.java
index 3befbeb..a3bb0d0 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/mirror/ArtifactMirrorApplicationTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/mirror/ArtifactMirrorApplicationTest.java
@@ -48,7 +48,6 @@ public class ArtifactMirrorApplicationTest extends AbstractProvisioningTest {
* @see org.eclipse.equinox.p2.tests.AbstractProvisioningTest#setUp()
*/
protected void setUp() throws Exception {
- TestTimeoutDump.setUp(this, 60);
super.setUp();
//load all the repositories
sourceRepoLocation = getTestData("0.0", "/testData/mirror/mirrorSourceRepo1 with space");
@@ -75,7 +74,6 @@ public class ArtifactMirrorApplicationTest extends AbstractProvisioningTest {
//delete the destination location (no left over files for the next test)
delete(destRepoLocation);
super.tearDown();
- TestTimeoutDump.tearDown();
}
/**
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/mirror/MetadataMirrorApplicationTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/mirror/MetadataMirrorApplicationTest.java
index 9c40d79..d89002c 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/mirror/MetadataMirrorApplicationTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/mirror/MetadataMirrorApplicationTest.java
@@ -24,7 +24,6 @@ import org.eclipse.equinox.p2.repository.IRepository;
import org.eclipse.equinox.p2.repository.metadata.IMetadataRepository;
import org.eclipse.equinox.p2.repository.metadata.IMetadataRepositoryManager;
import org.eclipse.equinox.p2.tests.AbstractProvisioningTest;
-import org.eclipse.equinox.p2.tests.TestTimeoutDump;
/**
* Test API of the basic mirror application functionality's implementation.
@@ -40,7 +39,6 @@ public class MetadataMirrorApplicationTest extends AbstractProvisioningTest {
* @see org.eclipse.equinox.p2.tests.AbstractProvisioningTest#setUp()
*/
protected void setUp() throws Exception {
- TestTimeoutDump.setUp(this, 60);
super.setUp();
//load all the repositories
sourceRepoLocation = getTestData("0.0", "/testData/mirror/mirrorSourceRepo1 with space");
@@ -67,7 +65,6 @@ public class MetadataMirrorApplicationTest extends AbstractProvisioningTest {
//delete the destination location (no left over files for the next test)
delete(destRepoLocation);
super.tearDown();
- TestTimeoutDump.tearDown();
}
/**
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/mirror/NewMirrorApplicationArtifactTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/mirror/NewMirrorApplicationArtifactTest.java
index a0f20db..df65a10 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/mirror/NewMirrorApplicationArtifactTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/mirror/NewMirrorApplicationArtifactTest.java
@@ -50,7 +50,6 @@ public class NewMirrorApplicationArtifactTest extends AbstractProvisioningTest {
* @see org.eclipse.equinox.p2.tests.AbstractProvisioningTest#setUp()
*/
protected void setUp() throws Exception {
- TestTimeoutDump.setUp(this, 60);
super.setUp();
//load all the repositories
sourceRepoLocation = getTestData("0.0", "/testData/mirror/mirrorSourceRepo1 with space");
@@ -76,7 +75,6 @@ public class NewMirrorApplicationArtifactTest extends AbstractProvisioningTest {
//delete the destination location (no left over files for the next test)
delete(destRepoLocation);
super.tearDown();
- TestTimeoutDump.tearDown();
}
private StringBuffer basicRunMirrorApplication(String message, URI source, URI destination, Boolean append, Boolean formatDestination, String destName) throws Exception {
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/mirror/NewMirrorApplicationMetadataTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/mirror/NewMirrorApplicationMetadataTest.java
index 6063943..863c329 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/mirror/NewMirrorApplicationMetadataTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/mirror/NewMirrorApplicationMetadataTest.java
@@ -26,7 +26,6 @@ import org.eclipse.equinox.p2.repository.IRepositoryReference;
import org.eclipse.equinox.p2.repository.metadata.IMetadataRepository;
import org.eclipse.equinox.p2.repository.metadata.IMetadataRepositoryManager;
import org.eclipse.equinox.p2.tests.AbstractProvisioningTest;
-import org.eclipse.equinox.p2.tests.TestTimeoutDump;
import org.eclipse.osgi.util.NLS;
/*
@@ -46,7 +45,6 @@ public class NewMirrorApplicationMetadataTest extends AbstractProvisioningTest {
* @see org.eclipse.equinox.p2.tests.AbstractProvisioningTest#setUp()
*/
protected void setUp() throws Exception {
- TestTimeoutDump.setUp(this, 60);
super.setUp();
//load all the repositories
sourceRepoLocation = getTestData("0.0", "/testData/mirror/mirrorSourceRepo1 with space");
@@ -75,7 +73,6 @@ public class NewMirrorApplicationMetadataTest extends AbstractProvisioningTest {
//delete the destination location (no left over files for the next test)
delete(destRepoLocation);
super.tearDown();
- TestTimeoutDump.tearDown();
}
/**