Skip to content

Commit

Permalink
Added wait statements to make it wait for the test to pass.
Browse files Browse the repository at this point in the history
The test doesn't always produce the same results on running.
This commit belongs to issue #194.
  • Loading branch information
rajkuma1 committed May 18, 2011
1 parent 824c692 commit ec04c36
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 38 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,43 +33,6 @@ public class ProblemChanges {

Set<DefaultProblemWrapper> beforeMinusAfter;

// @Override
// public int hashCode() {
// final int prime= 31;
// int result= 1;
// result= prime * result + ((afterMinusBefore == null) ? 0 : afterMinusBefore.hashCode());
// result= prime * result + ((beforeMinusAfter == null) ? 0 : beforeMinusAfter.hashCode());
// return result;
// }

// @Override
// public boolean equals(Object obj) {
// if (this == obj) {
// return true;
// } else if (obj instanceof ProblemChanges == false) {
// return false;
// }
// ProblemChanges rhs= (ProblemChanges)obj;
// return isEqual(afterMinusBefore, rhs.afterMinusBefore) && isEqual(beforeMinusAfter, rhs.beforeMinusAfter);
//
// }




// private boolean isEqual(Set<DefaultProblemWrapper> lhs, Set<DefaultProblemWrapper> rhs) {
//
// if (lhs.size() != rhs.size()) {
// return false;
// }
// for (DefaultProblemWrapper problemEntry : rhs) {
// if (lhs.contains(problemEntry) == false) {
// return false;
// }
// }
// return true;
// }

@Override
public int hashCode() {
final int prime= 31;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ protected void doCleanRefactoringHistory() throws CoreException {
private void cleanUpWorkspace() throws CoreException {
bot.deleteProject(getProjectName());
EFS.getLocalFileSystem().getStore(getActualRefactoringProblemsLogPath()).delete(EFS.NONE, null);
bot.sleep();
// bot.sleep();
// Deleting a project is a refactoring that gets logged in .refactorings/.workspace.
// We need to delete the .refactoring folder after the deletion of the project,
// otherwise, the next test fails because it expects the refactoring history folder to be empty initially.
Expand Down Expand Up @@ -175,6 +175,7 @@ public final void cleanRefactoringHistory() throws CoreException {
@Test
public final void deleteCurrentProject() throws CoreException {
cleanUpWorkspace();
bot.sleep();
doRefactoringLogShouldBeEmpty();
bot.sleep();
}
Expand Down

0 comments on commit ec04c36

Please sign in to comment.