diff options
| author | Sarika Sinha | 2020-05-27 09:18:28 +0000 |
|---|---|---|
| committer | Sarika Sinha | 2020-05-27 09:49:44 +0000 |
| commit | 9746b04bceedb83f12158e4e219054cb966815b5 (patch) | |
| tree | 4754873a19c0aca8cbd15efa02023f4e87b412e1 | |
| parent | 24c902dc95adaf885e41db96320cfc3c78af29d3 (diff) | |
| download | eclipse.jdt.debug-9746b04bceedb83f12158e4e219054cb966815b5.tar.gz eclipse.jdt.debug-9746b04bceedb83f12158e4e219054cb966815b5.tar.xz eclipse.jdt.debug-9746b04bceedb83f12158e4e219054cb966815b5.zip | |
Bug 561967 - [Tests] 3 tests failing on cen64-gtk3 since I20200406-0350S4_16_0_RC1I20200602-0600I20200602-0510I20200602-0010I20200601-1800I20200601-0640I20200601-0140I20200531-1800I20200531-0600I20200530-0600I20200529-0550I20200528-0200I20200528-0000I20200527-1800I20200527-0600
user.home may not be available for docker image
Change-Id: Ic0bba1be6889dad943f3c30fb166ba4be221cbd1
| -rw-r--r-- | org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/launching/ClasspathShortenerTests.java | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/launching/ClasspathShortenerTests.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/launching/ClasspathShortenerTests.java index 6c7a43de2..e150c4336 100644 --- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/launching/ClasspathShortenerTests.java +++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/launching/ClasspathShortenerTests.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2018, 2019 Cedric Chabanois and others. + * Copyright (c) 2018, 2020 Cedric Chabanois and others. * * This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 @@ -123,8 +123,12 @@ public class ClasspathShortenerTests extends AbstractDebugTest { assertArrayEquals(new String[] { JAVA_10_PATH, ENCODING_ARG, "-classpath", classpathShortener.getProcessTempFiles().get(0).getAbsolutePath(), MAIN_CLASS, "-arg1", "arg2" }, classpathShortener.getCmdLine()); List<File> classpathJars = getClasspathJarsFromJarManifest(classpathShortener.getProcessTempFiles().get(0)); - assertEquals(new File(userHomePath("/workspace/myProject/bin")), classpathJars.get(0).getCanonicalFile()); - assertEquals(new File(userHomePath("/workspace/myProject/lib/lib 1.jar")), classpathJars.get(1).getCanonicalFile()); + String filePathSuffix = new File(userHomePath("/workspace/myProject/bin")).getPath(); + int index = classpathJars.get(0).getCanonicalFile().getPath().lastIndexOf(filePathSuffix); + assertTrue("First Classpath jar file location not found", index != -1); + filePathSuffix = new File(userHomePath("/workspace/myProject/lib/lib 1.jar")).getPath(); + index = classpathJars.get(1).getCanonicalFile().getPath().lastIndexOf(filePathSuffix); + assertTrue("Second Classpath jar file location not found", index != -1); } public void testArgFileUsedForLongClasspathOnJava9() throws Exception { |
