lucyyao-db commented on code in PR #41705:
URL: https://github.com/apache/spark/pull/41705#discussion_r1261588895


##########
sql/core/src/test/scala/org/apache/spark/sql/execution/streaming/state/StateStoreSuite.scala:
##########
@@ -876,12 +889,17 @@ abstract class StateStoreSuiteBase[ProviderClass <: 
StateStoreProvider]
       assert(getLatestData(provider) === Set(("b", 0) -> 2))
 
       // Trying to get newer versions should fail
-      intercept[Exception] {
+      var e = intercept[SparkException] {
         provider.getStore(2)
       }
-      intercept[Exception] {
+      assert(e.getCause.isInstanceOf[SparkException])
+      assert(e.getCause.getMessage.contains("does not exist"))

Review Comment:
   I'm also not sure how to check this error because CANNOT_READ_DELTA_FILE is 
thrown through StateStoreSuite and CANNOT_READ_STREAMING_STATE_FILE is thrown 
through RocksDBStateStoreSuite. I guess I can also use Regex



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