Skip to content

Commit

Permalink
Disable a flaky test (#247)
Browse files Browse the repository at this point in the history
Disabled because it is flaky. Although preferably noop, either behavior is acceptable in this case.
  • Loading branch information
wisechengyi authored Jan 14, 2017
1 parent 9cce5de commit e1d1139
Showing 1 changed file with 17 additions and 13 deletions.
30 changes: 17 additions & 13 deletions tests/com/twitter/intellij/pants/integration/NoopCompileTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -80,19 +80,23 @@ public void testAddThenDeleteSameFileInsideProjectShouldNoop() throws Throwable
assertPantsCompileNoop(pantsCompileProject());
}

public void testAddThenDeleteFileOutsideProjectShouldNoop() throws Throwable {
assertPantsCompileExecutesAndSucceeds(pantsCompileProject());
// Simulate out of band adding a file outside of IDE
Path newFilePath = Paths.get(getProjectFolder().getPath(), "examples/a.txt");
Files.write(newFilePath, Collections.singleton("123"), Charset.defaultCharset());
// When user switches back to IntelliJ LocalFileSystem refresh will be called.
LocalFileSystem.getInstance().refresh(false);
assertPantsCompileNoop(pantsCompileProject());

Files.delete(newFilePath);
LocalFileSystem.getInstance().refresh(false);
assertPantsCompileNoop(pantsCompileProject());
}
/**
* NOTE: Disabled because it is flaky.
* Also either behavior is okay in this case, although preferably noop.
*/
//public void testAddThenDeleteFileOutsideProjectShouldNoop() throws Throwable {
// assertPantsCompileExecutesAndSucceeds(pantsCompileProject());
// // Simulate out of band adding a file outside of IDE
// Path newFilePath = Paths.get(getProjectFolder().getPath(), "examples/a.txt");
// Files.write(newFilePath, Collections.singleton("123"), Charset.defaultCharset());
// // When user switches back to IntelliJ LocalFileSystem refresh will be called.
// LocalFileSystem.getInstance().refresh(false);
// assertPantsCompileNoop(pantsCompileProject());
//
// Files.delete(newFilePath);
// LocalFileSystem.getInstance().refresh(false);
// assertPantsCompileNoop(pantsCompileProject());
//}

public void testAddThenDeleteFileInProjectShouldOp() throws Throwable {
assertPantsCompileExecutesAndSucceeds(pantsCompileProject());
Expand Down

0 comments on commit e1d1139

Please sign in to comment.