mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-23 17:05:26 +02:00
bug 311468: JUnit failure: ErrorParserFileMatchingTest - SymbolicLink
More investigative asserts added
This commit is contained in:
parent
25fb53e9dc
commit
207ec8f911
1 changed files with 19 additions and 3 deletions
|
@ -541,10 +541,26 @@ public class ResourceHelper {
|
|||
try {
|
||||
process.waitFor();
|
||||
} catch (InterruptedException e) {
|
||||
Assert.assertTrue("Command to create symbolic link was interrupted: "+e.toString(),
|
||||
new File(linkedPath.toOSString()).exists());
|
||||
}
|
||||
|
||||
if (!new File(linkedPath.toOSString()).exists()) {
|
||||
// Not supposed to happen, trying to figure out what's going on
|
||||
final int timeCount = 5;
|
||||
for (int i=1;i<=timeCount;i++) {
|
||||
try {
|
||||
Thread.sleep(1000);
|
||||
} catch (InterruptedException e) {
|
||||
}
|
||||
if (new File(linkedPath.toOSString()).exists()) {
|
||||
Assert.fail("Symbolic link created only after "+i+" seconds: [" + command +"]");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Assert.fail("Symbolic link NOT created after "+timeCount+" seconds: [" + command +"]");
|
||||
}
|
||||
|
||||
Assert.assertTrue("Symbolic link was not created: [" + command +"]",
|
||||
new File(linkedPath.toOSString()).exists());
|
||||
|
||||
IResource resource = project.getFile(linkName);
|
||||
resource.refreshLocal(IResource.DEPTH_ZERO, null);
|
||||
|
|
Loading…
Add table
Reference in a new issue