File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
core/src/test/scala/org/apache/spark/storage Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -51,8 +51,11 @@ class LargeIteratorSuite extends FunSuite with LocalSparkContext {
5151 " This is the second sentence that we will test:" ,
5252 " This is the third sentence that we will test:"
5353 ) );
54- val out = seeds.flatMap(Expander .expand(_,10000000 ));
55- out.map(_ + " ..." ).persist(StorageLevel .DISK_ONLY ).saveAsTextFile(" ./test.out" )
54+ val expand_size = 10000000 ;
55+ val out = seeds.flatMap(Expander .expand(_,expand_size));
56+ val expanded = out.map(_ + " ..." ).persist(StorageLevel .DISK_ONLY )
57+ assert( expanded.filter( _.startsWith(" This is the first sentence that we will test" )).count() == expand_size )
58+ expanded.saveAsTextFile(" ./test.out" )
5659 FileUtils .deleteDirectory(new File (" ./test.out" ))
5760 }
5861}
You can’t perform that action at this time.
0 commit comments