Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix bad tests. Tests are faling because file locking has been turned …
…off by default causing different exceptions to happen.
  • Loading branch information
squarti committed Jun 27, 2017
1 parent 256e5d3 commit 40e9ddf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
Expand Up @@ -664,10 +664,10 @@ public void testCreateProjectWithURLAsName() throws CoreException {
projectInfo.setWorkspaceId(workspaceInfo.getUniqueId());
try {
metaStore.createProject(projectInfo);
} catch (RuntimeException e) {
// we expect to get a runtime exception here
} catch (CoreException e) {
// we expect to get a core exception here
String message = e.getMessage();
assertTrue(message.contains("Meta File Error, file IO error, could not lock the file"));
assertTrue(message.contains("could not find workspace"));
}
}

Expand Down
Expand Up @@ -132,13 +132,7 @@ public void testCreateMetaFileWithBadName() throws JSONException {
File parent = getTempDir();
String name = "this//is//bad";
// try to create the file
try {
SimpleMetaStoreUtil.createMetaFile(parent, name, jsonObject);
} catch (RuntimeException e) {
/* this is the desired outcome */
return;
}
assertTrue("Attempting to create a metafile with an invalid path should have thrown an exception", false);
assertFalse(SimpleMetaStoreUtil.createMetaFile(parent, name, jsonObject));
}

@Test
Expand Down

0 comments on commit 40e9ddf

Please sign in to comment.