2121import tempfile
2222import pathlib
2323from . import TestEnvironment
24+ from unittest import skipIf
25+ import os
2426
2527
2628class GeotrellisTests (TestEnvironment ):
2729
30+ on_circle_ci = os .environ .get ('CIRCLECI' , 'false' ) == 'true'
31+
32+ @skipIf (on_circle_ci , 'CircleCI has java.lang.NoClassDefFoundError fs2/Stream when taking action on rf_gt' )
2833 def test_write_geotrellis_layer (self ):
2934 rf = self .spark .read .geotiff (self .img_uri ).cache ()
3035 rf_count = rf .count ()
@@ -41,13 +46,13 @@ def test_write_geotrellis_layer(self):
4146 rf_gt_count = rf_gt .count ()
4247 self .assertTrue (rf_gt_count > 0 )
4348
44- # maybe CI is unhappy about print / show.
4549 _ = rf_gt .take (1 )
4650
4751 shutil .rmtree (dest , ignore_errors = True )
4852
53+ @skipIf (on_circle_ci , 'CircleCI has java.lang.NoClassDefFoundError fs2/Stream when taking action on rf_gt' )
4954 def test_write_geotrellis_multiband_layer (self ):
50- rf = self .spark .read .geotiff (self .img_rgb_uri )
55+ rf = self .spark .read .geotiff (self .img_rgb_uri ). cache ()
5156 rf_count = rf .count ()
5257 self .assertTrue (rf_count > 0 )
5358
@@ -62,7 +67,6 @@ def test_write_geotrellis_multiband_layer(self):
6267 rf_gt_count = rf_gt .count ()
6368 self .assertTrue (rf_gt_count > 0 )
6469
65- # maybe CI is unhappy about print / show.
6670 _ = rf_gt .take (1 )
6771
6872 shutil .rmtree (dest , ignore_errors = True )
0 commit comments