Skip to content

Commit 02d0276

Browse files
committed
addeded clean up to unit tests for safety measure]
1 parent 34a2d40 commit 02d0276

File tree

1 file changed

+16
-3
lines changed

1 file changed

+16
-3
lines changed

src/test/java/org/gluster/test/TestGluster.java

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,6 @@ public void testTextWriteAndRead() throws Exception{
162162

163163
@org.junit.Test
164164
public void testZDirs() throws Exception {
165-
166165
final Path subDir1 = new Path("td_dir.1");
167166
final Path baseDir = new Path("td_testDirs1");
168167
final Path test1 = new Path("td_test1");
@@ -205,7 +204,12 @@ public void testZDirs() throws Exception {
205204
assertFalse(gfs.exists(subDir1));
206205

207206
System.out.println("done.");
208-
}
207+
208+
gfs.delete(subDir1);
209+
gfs.delete(baseDir);
210+
gfs.delete(test1);
211+
gfs.delete(test1);
212+
}
209213

210214
@org.junit.Test
211215
public void testFiles() throws Exception {
@@ -241,6 +245,11 @@ public void testFiles() throws Exception {
241245

242246
gfs.delete(baseDir, true);
243247
assertFalse(gfs.exists(baseDir));
248+
249+
gfs.delete(subDir1);
250+
gfs.delete(baseDir);
251+
gfs.delete(file1);
252+
gfs.delete(file2);
244253
}
245254

246255
public void testFileIO() throws Exception {
@@ -302,7 +311,11 @@ public void testFileIO() throws Exception {
302311
gfs.delete(subDir1, true);
303312
assertFalse(gfs.exists(subDir1));
304313
gfs.delete(baseDir, true);
305-
assertFalse(gfs.exists(baseDir));
314+
assertFalse(gfs.exists(baseDir));
315+
316+
gfs.delete(subDir1);
317+
gfs.delete(file1);
318+
gfs.delete(baseDir);
306319
}
307320

308321

0 commit comments

Comments
 (0)