tdg5 commented on a change in pull request #34745:
URL: https://github.com/apache/spark/pull/34745#discussion_r758511777
##########
File path:
sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/jdbc/connection/ConnectionProviderSuite.scala
##########
@@ -107,12 +124,50 @@ class ConnectionProviderSuite
assert(providerBase.create(mock[Driver], Map.empty,
Some("test2")).isInstanceOf[Connection])
}
+ test("Synchronize on SecurityConfigurationLock when the specified connection
provider needs") {
+ val provider1 = new JdbcConnectionProvider() {
+ override val name: String = "test1"
+ override def canHandle(driver: Driver, options: Map[String, String]):
Boolean = true
+ override def getConnection(driver: Driver, options: Map[String,
String]): Connection = {
+ assert(Thread.holdsLock(SecurityConfigurationLock))
Review comment:
Open to better ideas on testing that the lock was acquired or not. Could
change it to an actual lock, but preferred to avoid the downstream
repercussions.
--
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]