tdas commented on a change in pull request #32938:
URL: https://github.com/apache/spark/pull/32938#discussion_r655789819



##########
File path: 
sql/core/src/test/scala/org/apache/spark/sql/streaming/FlatMapGroupsWithStateSuite.scala
##########
@@ -1291,24 +1391,24 @@ class FlatMapGroupsWithStateSuite extends 
StateStoreMetricsTest {
       }.get
   }
 
-  def testTimeoutDurationNotAllowed[T <: Exception: Manifest](state: 
GroupStateImpl[_]): Unit = {
-    val prevTimestamp = state.getTimeoutTimestamp
+  def testTimeoutDurationNotAllowed[T <: Exception: Manifest](state: 
TestGroupState[_]): Unit = {
+    val prevTimestamp = state.getTimeoutTimestampMs
     intercept[T] { state.setTimeoutDuration(1000) }
-    assert(state.getTimeoutTimestamp === prevTimestamp)
+    assert(state.getTimeoutTimestampMs === prevTimestamp)
     intercept[T] { state.setTimeoutDuration("2 second") }
-    assert(state.getTimeoutTimestamp === prevTimestamp)
+    assert(state.getTimeoutTimestampMs === prevTimestamp)
   }
 
-  def testTimeoutTimestampNotAllowed[T <: Exception: Manifest](state: 
GroupStateImpl[_]): Unit = {
-    val prevTimestamp = state.getTimeoutTimestamp
+  def testTimeoutTimestampNotAllowed[T <: Exception: Manifest](state: 
TestGroupState[_]): Unit = {
+    val prevTimestamp = state.getTimeoutTimestampMs
     intercept[T] { state.setTimeoutTimestamp(2000) }
-    assert(state.getTimeoutTimestamp === prevTimestamp)
+    assert(state.getTimeoutTimestampMs === prevTimestamp)
     intercept[T] { state.setTimeoutTimestamp(2000, "1 second") }
-    assert(state.getTimeoutTimestamp === prevTimestamp)
+    assert(state.getTimeoutTimestampMs === prevTimestamp)
     intercept[T] { state.setTimeoutTimestamp(new Date(2000)) }
-    assert(state.getTimeoutTimestamp === prevTimestamp)
+    assert(state.getTimeoutTimestampMs === prevTimestamp)
     intercept[T] { state.setTimeoutTimestamp(new Date(2000), "1 second") }
-    assert(state.getTimeoutTimestamp === prevTimestamp)
+    assert(state.getTimeoutTimestampMs === prevTimestamp)
   }
 
   def newStateStore(): StateStore = new MemoryStateStore()

Review comment:
       We should add a Java unit test!




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to