Skip to content

Commit

Permalink
last commit did not pick up the actual fix for the test case-- checki…
Browse files Browse the repository at this point in the history
…ng ti in
  • Loading branch information
abh1nay committed Mar 25, 2013
1 parent d4f5935 commit 0c05a03
Showing 1 changed file with 8 additions and 4 deletions.
Expand Up @@ -44,6 +44,7 @@
import voldemort.store.readonly.checksum.CheckSum.CheckSumType;
import voldemort.store.readonly.checksum.CheckSumTests;
import voldemort.store.readonly.fetcher.HdfsFetcher.CopyStats;
import voldemort.utils.Utils;

/*
* This test suite tests the HDFSFetcher We test the fetch from hadoop by
Expand Down Expand Up @@ -83,20 +84,20 @@ public void testCheckSumMetadata() throws Exception {
CheckSumType.MD5))));
FileUtils.writeStringToFile(metadataFile, metadata.toJsonString());

File tempDest = new File(testDestinationDirectory.getAbsolutePath() + "3");
File tempDest = new File(testDestinationDirectory.getAbsolutePath() + "1");
if(tempDest.exists()) {

deleteDir(tempDest);
}

File fetchedFile = fetcher.fetch(testSourceDirectory.getAbsolutePath(),
testDestinationDirectory.getAbsolutePath() + "3");
testDestinationDirectory.getAbsolutePath() + "1");

assertNotNull(fetchedFile);
assertEquals(fetchedFile.getAbsolutePath(), testDestinationDirectory.getAbsolutePath()
+ "3");
+ "1");

tempDest = new File(testDestinationDirectory.getAbsolutePath() + "3");
tempDest = new File(testDestinationDirectory.getAbsolutePath() + "1");
if(tempDest.exists()) {

deleteDir(tempDest);
Expand Down Expand Up @@ -178,6 +179,7 @@ public void testEofExceptionIntermittent() throws Exception {
source));

File destination = new File(testDestinationDirectory.getAbsolutePath() + "1");
Utils.mkdirs(destination);
File copyLocation = new File(destination, "0_0.index");

Mockito.doThrow(new IOException())
Expand Down Expand Up @@ -229,6 +231,7 @@ public void testEofExceptionIntermittentDuringFetch() throws Exception {
source));

File destination = new File(testDestinationDirectory.getAbsolutePath() + "1");
Utils.mkdirs(destination);
File copyLocation = new File(destination, "0_0.index");

FSDataInputStream input = null;
Expand Down Expand Up @@ -286,6 +289,7 @@ public void testIntermittentRuntimeExceptions() throws Exception {
source));

File destination = new File(testDestinationDirectory.getAbsolutePath() + "1");
Utils.mkdirs(destination);
File copyLocation = new File(destination, "0_0.index");

Mockito.doThrow(new RuntimeException())
Expand Down

0 comments on commit 0c05a03

Please sign in to comment.