Skip to content

Commit

Permalink
Merge pull request #394 from s22s/fix/393
Browse files Browse the repository at this point in the history
Expanded RasterRefSpec to ensure lazy tiles provide metadata without I/O
  • Loading branch information
vpipkt authored Oct 21, 2019
2 parents d88d78b + 7ca1a04 commit c0647b0
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@ jobs:
include:
- stage: "Unit Tests"
script: sbt/bin/sbt -java-home $JAVA_HOME -batch test
- stage: "Integration"
- stage: "Integration Tests"
script: sbt/bin/sbt -java-home $JAVA_HOME -batch it:test
Original file line number Diff line number Diff line change
Expand Up @@ -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())
}
}
}
Expand Down

0 comments on commit c0647b0

Please sign in to comment.