Skip to content

Commit c0f4ff6

Browse files
committed
unit test for create NR
1 parent 1723ee5 commit c0f4ff6

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

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

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ public void testPermissions() throws Exception{
249249
gfs.delete(new Path("aa"),true);
250250
assertFalse(gfs.exists(directory));
251251
}
252-
252+
253253
@org.junit.Test
254254
public void testZDirs() throws Exception{
255255
final Path subDir1=new Path("td_dir.1");
@@ -435,4 +435,16 @@ public void test0aPermissions() throws Exception{
435435
gfs.delete(new Path("mnt"),true);
436436

437437
}
438+
439+
440+
@Test
441+
public void testCreateNR() throws Exception{
442+
Path nonrec = new Path("nonrec");
443+
this.gfs.createNonRecursive(
444+
new Path("nonrec"),
445+
FsPermission.valueOf("-rwxrwxrwx"),
446+
true, 100, (short)0, 0L, null);
447+
Assert.assertTrue(this.gfs.exists(new Path("nonrec")));
448+
this.gfs.delete(nonrec);
449+
}
438450
}

0 commit comments

Comments
 (0)