Skip to content

Commit c0647b0

Browse files
authored
Merge pull request #394 from s22s/fix/393
Expanded RasterRefSpec to ensure lazy tiles provide metadata without I/O
2 parents d88d78b + 7ca1a04 commit c0647b0

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,5 @@ jobs:
3232
include:
3333
- stage: "Unit Tests"
3434
script: sbt/bin/sbt -java-home $JAVA_HOME -batch test
35-
- stage: "Integration"
35+
- stage: "Integration Tests"
3636
script: sbt/bin/sbt -java-home $JAVA_HOME -batch it:test

core/src/test/scala/org/locationtech/rasterframes/ref/RasterRefSpec.scala

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -253,14 +253,18 @@ class RasterRefSpec extends TestEnvironment with TestData {
253253
}
254254
}
255255

256-
it("should construct a RasterRefTile without I/O") {
256+
it("should construct and inspect a RasterRefTile without I/O") {
257257
new Fixture {
258258
// SimpleRasterInfo is a proxy for header data requests.
259-
val start = SimpleRasterInfo.cacheStats.hitCount()
259+
val startStats = SimpleRasterInfo.cacheStats
260260
val t: ProjectedRasterTile = RasterRefTile(subRaster)
261-
val result = Seq(t, subRaster.tile).toDF("tile").first()
262-
val end = SimpleRasterInfo.cacheStats.hitCount()
263-
end should be(start)
261+
val df = Seq(t, subRaster.tile).toDF("tile")
262+
val result = df.first()
263+
SimpleRasterInfo.cacheStats.hitCount() should be(startStats.hitCount())
264+
SimpleRasterInfo.cacheStats.missCount() should be(startStats.missCount())
265+
val info = df.select(rf_dimensions($"tile"), rf_extent($"tile")).first()
266+
SimpleRasterInfo.cacheStats.hitCount() should be(startStats.hitCount() + 2)
267+
SimpleRasterInfo.cacheStats.missCount() should be(startStats.missCount())
264268
}
265269
}
266270
}

0 commit comments

Comments
 (0)