Skip to content

Commit 681db88

Browse files
committed
modify test name
1 parent 80f2c40 commit 681db88

File tree

2 files changed

+15
-15
lines changed

2 files changed

+15
-15
lines changed

sql/core/src/test/scala/org/apache/spark/sql/execution/command/DDLSuite.scala

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1995,11 +1995,11 @@ class DDLSuite extends QueryTest with SharedSQLContext with BeforeAndAfterEach {
19951995
}
19961996
}
19971997

1998-
Seq("a b", "a:b", "a%b").foreach { specialCharInLoc =>
1999-
test(s"location uri contains $specialCharInLoc for datasource table") {
1998+
Seq("a b", "a:b", "a%b").foreach { specialChars =>
1999+
test(s"location uri contains $specialChars for datasource table") {
20002000
withTable("t", "t1") {
20012001
withTempDir { dir =>
2002-
val loc = new File(dir, specialCharInLoc)
2002+
val loc = new File(dir, specialChars)
20032003
loc.mkdir()
20042004
spark.sql(
20052005
s"""
@@ -2010,7 +2010,7 @@ class DDLSuite extends QueryTest with SharedSQLContext with BeforeAndAfterEach {
20102010

20112011
val table = spark.sessionState.catalog.getTableMetadata(TableIdentifier("t"))
20122012
assert(table.location == new Path(loc.getAbsolutePath).toUri)
2013-
assert(new Path(table.location).toString.contains(specialCharInLoc))
2013+
assert(new Path(table.location).toString.contains(specialChars))
20142014

20152015
assert(loc.listFiles().isEmpty)
20162016
spark.sql("INSERT INTO TABLE t SELECT 1")
@@ -2019,7 +2019,7 @@ class DDLSuite extends QueryTest with SharedSQLContext with BeforeAndAfterEach {
20192019
}
20202020

20212021
withTempDir { dir =>
2022-
val loc = new File(dir, specialCharInLoc)
2022+
val loc = new File(dir, specialChars)
20232023
loc.mkdir()
20242024
spark.sql(
20252025
s"""
@@ -2050,12 +2050,12 @@ class DDLSuite extends QueryTest with SharedSQLContext with BeforeAndAfterEach {
20502050
}
20512051
}
20522052

2053-
Seq("a b", "a:b", "a%b").foreach { specialCharInLoc =>
2054-
test(s"location uri contains $specialCharInLoc for database") {
2053+
Seq("a b", "a:b", "a%b").foreach { specialChars =>
2054+
test(s"location uri contains $specialChars for database") {
20552055
try {
20562056
withTable("t") {
20572057
withTempDir { dir =>
2058-
val loc = new File(dir, specialCharInLoc)
2058+
val loc = new File(dir, specialChars)
20592059
spark.sql(s"CREATE DATABASE tmpdb LOCATION '$loc'")
20602060
spark.sql("USE tmpdb")
20612061

sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/HiveDDLSuite.scala

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1745,11 +1745,11 @@ class HiveDDLSuite
17451745
}
17461746
}
17471747

1748-
Seq("a b", "a:b", "a%b").foreach { specialCharInLoc =>
1749-
test(s"location uri contains $specialCharInLoc for hive table") {
1748+
Seq("a b", "a:b", "a%b").foreach { specialChars =>
1749+
test(s"location uri contains $specialChars for hive table") {
17501750
withTable("t") {
17511751
withTempDir { dir =>
1752-
val loc = new File(dir, specialCharInLoc)
1752+
val loc = new File(dir, specialChars)
17531753
loc.mkdir()
17541754
spark.sql(
17551755
s"""
@@ -1778,7 +1778,7 @@ class HiveDDLSuite
17781778
}
17791779

17801780
withTempDir { dir =>
1781-
val loc = new File(dir, specialCharInLoc)
1781+
val loc = new File(dir, specialChars)
17821782
loc.mkdir()
17831783
spark.sql(
17841784
s"""
@@ -1824,12 +1824,12 @@ class HiveDDLSuite
18241824
}
18251825
}
18261826

1827-
Seq("a b", "a:b", "a%b").foreach { specialCharInLoc =>
1828-
test(s"location uri contains $specialCharInLoc for database") {
1827+
Seq("a b", "a:b", "a%b").foreach { specialChars =>
1828+
test(s"location uri contains $specialChars for database") {
18291829
try {
18301830
withTable("t") {
18311831
withTempDir { dir =>
1832-
val loc = new File(dir, specialCharInLoc)
1832+
val loc = new File(dir, specialChars)
18331833
spark.sql(s"CREATE DATABASE tmpdb LOCATION '$loc'")
18341834
spark.sql("USE tmpdb")
18351835

0 commit comments

Comments
 (0)