Skip to main content
summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorMalgorzata Janczarska2013-03-18 10:55:05 +0000
committerMalgorzata Janczarska2013-03-18 10:55:05 +0000
commit19fdc06af040caedeb214e139e7aec55875a1302 (patch)
tree4c3ee2e3b70fda4aa9d966c456407faa9469e667 /tests
parent9aafcf493a318683733dd13ccbd098af4b2cc393 (diff)
downloadeclipse.platform.team-19fdc06af040caedeb214e139e7aec55875a1302.tar.gz
eclipse.platform.team-19fdc06af040caedeb214e139e7aec55875a1302.tar.xz
eclipse.platform.team-19fdc06af040caedeb214e139e7aec55875a1302.zip
Bug 399375 - Test failures in ResourceMapperTests: TIMEOUTN20130318-2000
Diffstat (limited to 'tests')
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/mappings/ResourceMapperTests.java38
1 files changed, 28 insertions, 10 deletions
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/mappings/ResourceMapperTests.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/mappings/ResourceMapperTests.java
index 5000e0b88..cb46ecea9 100644
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/mappings/ResourceMapperTests.java
+++ b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/mappings/ResourceMapperTests.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2011 IBM Corporation and others.
+ * Copyright (c) 2000, 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
@@ -468,15 +468,33 @@ public class ResourceMapperTests extends EclipseTest {
}
}
- private boolean isTimeout(Throwable e){
- if(e instanceof InterruptedIOException && e.getMessage() !=null && e.getMessage().indexOf("Timeout while writing to output stream")>0){
- return true;
- }
- if(e.getCause()!=null){
- return isTimeout(e.getCause());
- }
- return false;
- }
+ private boolean isTimeout(Throwable e) {
+ if (e == null) {
+ return false;
+ }
+
+ if (e instanceof InterruptedIOException
+ && e.getMessage() != null
+ && e.getMessage().indexOf(
+ "Timeout while writing to output stream") >= 0) {
+ return true;
+ }
+
+ if (e instanceof CoreException) {
+ CoreException ce = (CoreException) e;
+ if (ce.getStatus() != null && ce.getStatus().isMultiStatus()) {
+ MultiStatus multistatus = (MultiStatus) ce.getStatus();
+ for (int i = 0; i < multistatus.getChildren().length; i++) {
+ if (isTimeout(multistatus.getChildren()[i].getException())) {
+ return true;
+ }
+ }
+ }
+
+ }
+
+ return isTimeout(e.getCause());
+ }
public void testUpdate() throws Exception {
try{

Back to the top