diff --git a/.travis.yml b/.travis.yml index 12cad75b7..9b6f44ea2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,3 @@ -sudo: false dist: xenial language: python @@ -28,11 +27,10 @@ install: - pip install rasterio shapely pandas numpy pweave - wget -O - https://piccolo.link/sbt-1.2.8.tgz | tar xzf - -script: - - sbt/bin/sbt -java-home $JAVA_HOME -batch test - - sbt/bin/sbt -java-home $JAVA_HOME -batch it:test - # - sbt -Dfile.encoding=UTF8 clean coverage test coverageReport - # Tricks to avoid unnecessary cache updates - - find $HOME/.sbt -name "*.lock" | xargs rm - - find $HOME/.ivy2 -name "ivydata-*.properties" | xargs rm +jobs: + include: + - stage: "Unit Tests" + script: sbt/bin/sbt -java-home $JAVA_HOME -batch test + - stage: "Integration Tests" + script: sbt/bin/sbt -java-home $JAVA_HOME -batch it:test diff --git a/core/src/test/scala/org/locationtech/rasterframes/ref/RasterRefSpec.scala b/core/src/test/scala/org/locationtech/rasterframes/ref/RasterRefSpec.scala index 80f0a7082..51e3338d2 100644 --- a/core/src/test/scala/org/locationtech/rasterframes/ref/RasterRefSpec.scala +++ b/core/src/test/scala/org/locationtech/rasterframes/ref/RasterRefSpec.scala @@ -253,14 +253,18 @@ class RasterRefSpec extends TestEnvironment with TestData { } } - it("should construct a RasterRefTile without I/O") { + it("should construct and inspect a RasterRefTile without I/O") { new Fixture { // SimpleRasterInfo is a proxy for header data requests. - val start = SimpleRasterInfo.cacheStats.hitCount() + val startStats = SimpleRasterInfo.cacheStats val t: ProjectedRasterTile = RasterRefTile(subRaster) - val result = Seq(t, subRaster.tile).toDF("tile").first() - val end = SimpleRasterInfo.cacheStats.hitCount() - end should be(start) + val df = Seq(t, subRaster.tile).toDF("tile") + val result = df.first() + SimpleRasterInfo.cacheStats.hitCount() should be(startStats.hitCount()) + SimpleRasterInfo.cacheStats.missCount() should be(startStats.missCount()) + val info = df.select(rf_dimensions($"tile"), rf_extent($"tile")).first() + SimpleRasterInfo.cacheStats.hitCount() should be(startStats.hitCount() + 2) + SimpleRasterInfo.cacheStats.missCount() should be(startStats.missCount()) } } }