Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
brharrington committed Feb 12, 2024
1 parent a3e36ee commit 99680bb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,8 @@ object TimeSeriesMessage {
def apply(expr: StyleExpr, context: EvalContext, ts: TimeSeries): TimeSeriesMessage = {
val query = expr.toString
val offset = Strings.toString(Duration.ofMillis(expr.offset))
val outputTags = ts.tags ++ Map(TagKey.offset -> offset, "atlas.query" -> query)
val id = TaggedItem.computeId(outputTags).toString
val outputTags = ts.tags + (TagKey.offset -> offset)
val id = TaggedItem.computeId(outputTags + ("atlas.query" -> query)).toString
val data = ts.data.bounded(context.start, context.end)
TimeSeriesMessage(
id,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -587,7 +587,7 @@ class EvaluatorSuite extends FunSuite {
assertEquals(msgs.count(_.message.isInstanceOf[TimeSeriesMessage]), 1)

val ts = timeSeriesMessages(msgs).head
assertEquals(ts.tags, Map("name" -> "foo"))
assertEquals(ts.tags, Map("atlas.offset" -> "0w", "name" -> "foo"))
assertEquals(ts.data, ArrayData(Array(expected)))
}

Expand Down

0 comments on commit 99680bb

Please sign in to comment.