From 0c05a039b9e02a1a10fe015a24e17a3560539c74 Mon Sep 17 00:00:00 2001 From: Abhinay Nagpal Date: Mon, 25 Mar 2013 10:39:10 -0700 Subject: [PATCH] last commit did not pick up the actual fix for the test case-- checking ti in --- .../readonly/fetcher/HDFSFetcherAdvancedTest.java | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/contrib/hadoop-store-builder/test/voldemort/store/readonly/fetcher/HDFSFetcherAdvancedTest.java b/contrib/hadoop-store-builder/test/voldemort/store/readonly/fetcher/HDFSFetcherAdvancedTest.java index bab30d0cc5..6157d58a20 100644 --- a/contrib/hadoop-store-builder/test/voldemort/store/readonly/fetcher/HDFSFetcherAdvancedTest.java +++ b/contrib/hadoop-store-builder/test/voldemort/store/readonly/fetcher/HDFSFetcherAdvancedTest.java @@ -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 @@ -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); @@ -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()) @@ -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; @@ -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())