tmf: Fix SWTBot test on Windows related to short temp path
authorMarc-Andre Laperle <marc-andre.laperle@ericsson.com>
Fri, 13 Nov 2015 00:27:56 +0000 (19:27 -0500)
committerMarc-Andre Laperle <marc-andre.laperle@ericsson.com>
Thu, 12 Nov 2015 21:07:05 +0000 (16:07 -0500)
On Windows, the system property for the temorary path looks like this:
java.io.tmpdir=C:\Users\MARC-A~1\AppData\Local\Temp\

Which is a "short path". When used in comparison with full, canonical
paths, it fails.

Change-Id: I3a90f792791e6983c2eab60d54b1e0694ed98dab
Signed-off-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
Reviewed-on: https://git.eclipse.org/r/60273
Reviewed-by: Patrick Tasse <patrick.tasse@gmail.com>
Reviewed-by: Hudson CI
tmf/org.eclipse.tracecompass.tmf.ui.swtbot.tests/src/org/eclipse/tracecompass/tmf/ui/swtbot/tests/wizards/TestImportExportPackageWizard.java

index d0507250f95a25011bef9255e1905579338d8fa9..710ff07653a86646a3ab84bf18e770f110c52b7a 100644 (file)
@@ -114,7 +114,7 @@ public class TestImportExportPackageWizard {
      */
     @Test
     public void test() throws IOException {
-        File f = File.createTempFile("temp", ".xml");
+        File f = File.createTempFile("temp", ".xml").getCanonicalFile();
         try (FileWriter fw = new FileWriter(f)) {
             fw.write(TRACE_CONTENT);
         }
This page took 0.029576 seconds and 5 git commands to generate.