@@ -6,6 +6,7 @@ import com.algolia.search.helper.toAttribute
66import com.algolia.search.helper.toEventName
77import com.algolia.search.helper.toObjectID
88import com.algolia.search.helper.toUserToken
9+ import com.algolia.search.model.Time
910import com.algolia.search.model.filter.Filter
1011import com.algolia.search.model.insights.InsightsEvent
1112import com.algolia.search.model.search.Query
@@ -22,17 +23,19 @@ import kotlin.test.Test
2223
2324internal class TestSuiteInsights {
2425
26+ private val twoDaysInMillis = 172800000
2527 private val suffix = " insights"
2628 private val indexName = testSuiteIndexName(suffix)
2729 private val index = clientAdmin1.initIndex(indexName)
2830 private val userToken = " bar" .toUserToken()
2931 private val eventName = " eventName" .toEventName()
30- private val objectIDs = listOf (" obj1 " .toObjectID(), " obj2 " .toObjectID())
32+ private val objectIDs = listOf (" one " .toObjectID(), " two " .toObjectID())
3133 private val eventClick = InsightsEvent .Click (
3234 eventName = " foo" .toEventName(),
3335 userToken = userToken,
3436 indexName = indexName,
35- resources = InsightsEvent .Resources .ObjectIDs (objectIDs)
37+ resources = InsightsEvent .Resources .ObjectIDs (objectIDs),
38+ timestamp = Time .getCurrentTimeMillis() - twoDaysInMillis
3639 )
3740 private val user = clientInsights.User (userToken)
3841 private val attribute = " dsl/filtering" .toAttribute()
0 commit comments