liviazhu commented on code in PR #59144:
URL: https://github.com/apache/spark/pull/59144#discussion_r4147665486


##########
sql/core/src/test/scala/org/apache/spark/sql/execution/streaming/state/RocksDBStateStoreLockHardeningSuite.scala:
##########
@@ -250,13 +286,86 @@ class RocksDBStateStoreLockHardeningSuite extends 
SparkFunSuite
     val stateMachineObj = provider invokePrivate stateMachine()
     stateMachineObj.asInstanceOf[RocksDBStateMachine].close()
 
-    // Attempting to get a new store after close should fail
-    // with StateStoreInvalidStateMachineTransition
     val exception = intercept[StateStoreInvalidStateMachineTransition] {
       provider.getStore(1)
     }
 
-    assert(exception.getMessage.contains("Old state: CLOSED"))
+    checkError(
+      exception,
+      condition = "STATE_STORE_INVALID_STATE_MACHINE_TRANSITION",
+      parameters = Map(
+        "oldState" -> "CLOSED",
+        "newState" -> "ACQUIRED",
+        "operation" -> "load",
+        "storeId" -> provider.stateStoreId.toString))
+  }
+
+  test("SPARK-59877: StateStore retries a cached closed provider") {

Review Comment:
   Added new tests.



-- 
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.

To unsubscribe, e-mail: [email protected]

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