File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
sql/core/src/test/scala/org/apache/spark/sql Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -1038,16 +1038,20 @@ class SQLQuerySuite extends QueryTest with SharedSQLContext {
10381038 val nonexistentKey = " nonexistent"
10391039
10401040 // "set" itself returns all config variables currently specified in SQLConf.
1041- assert(sql(" SET" ).collect().size === TestSQLContext .overrideConfs.size)
1041+ val additionalSize = sys.env.size + sys.props.size
1042+ assert(sql(" SET" ).collect().size === TestSQLContext .overrideConfs.size + additionalSize)
1043+ val expectedMap = TestSQLContext .overrideConfs ++
1044+ sys.env.map { case (k, v) => (s " env: $k" , v) } ++
1045+ sys.props.map { case (k, v) => (s " system: $k" , v) }
10421046 sql(" SET" ).collect().foreach { row =>
10431047 val key = row.getString(0 )
10441048 val value = row.getString(1 )
10451049 assert(
1046- TestSQLContext .overrideConfs .contains(key),
1050+ expectedMap .contains(key),
10471051 s " $key should exist in SQLConf. " )
10481052 assert(
1049- TestSQLContext .overrideConfs (key) === value,
1050- s " The value of $key should be ${TestSQLContext .overrideConfs (key)} instead of $value. " )
1053+ expectedMap (key) === value,
1054+ s " The value of $key should be ${expectedMap (key)} instead of $value. " )
10511055 }
10521056 val overrideConfs = sql(" SET" ).collect()
10531057
You can’t perform that action at this time.
0 commit comments