File tree Expand file tree Collapse file tree 1 file changed +27
-0
lines changed
src/test/java/org/gluster/test Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -134,6 +134,33 @@ public static void before() throws Exception{
134
134
gfs .initialize (temp .toURI (), conf );
135
135
}
136
136
137
+
138
+
139
+ @ org .junit .Test
140
+ public void testTolerantMkdirs () throws Exception {
141
+ System .out .println ("Testing tollerance of mkdirs(a/b/c/d) then mkdirs(a/b/c)" );
142
+ Path longPath = new Path ("a/b/c/d" );
143
+ assertFalse (gfs .exists (longPath ));
144
+ gfs .mkdirs (longPath );
145
+ assertTrue (gfs .exists (longPath ));
146
+ gfs .mkdirs (new Path ("a" ));
147
+ assertTrue (gfs .exists (longPath ));
148
+ assertTrue (gfs .exists (new Path ("a" )));
149
+ gfs .mkdirs (new Path ("a/b" ));
150
+ assertTrue (gfs .exists (longPath ));
151
+ assertTrue (gfs .exists (new Path ("a/b" )));
152
+ gfs .mkdirs (new Path ("a/b/c" ));
153
+ assertTrue (gfs .exists (longPath ));
154
+ assertTrue (gfs .exists (new Path ("a/b/c" )));
155
+
156
+ /* delete the directories */
157
+
158
+ gfs .delete (longPath );
159
+ assertFalse (gfs .exists (longPath ));
160
+
161
+
162
+
163
+ }
137
164
@ org .junit .Test
138
165
public void testTextWriteAndRead () throws Exception {
139
166
You can’t perform that action at this time.
0 commit comments