File tree Expand file tree Collapse file tree 1 file changed +7
-11
lines changed
sql/core/src/test/scala/org/apache/spark/sql/test Expand file tree Collapse file tree 1 file changed +7
-11
lines changed Original file line number Diff line number Diff line change @@ -83,9 +83,7 @@ trait SharedSparkSession
83
83
* Make sure the [[TestSparkSession ]] is initialized before any tests are run.
84
84
*/
85
85
protected override def beforeAll (): Unit = {
86
- this .synchronized {
87
- initializeSession()
88
- }
86
+ initializeSession()
89
87
90
88
// Ensure we have initialized the context before calling parent code
91
89
super .beforeAll()
@@ -99,14 +97,12 @@ trait SharedSparkSession
99
97
super .afterAll()
100
98
} finally {
101
99
try {
102
- this .synchronized {
103
- if (_spark != null ) {
104
- try {
105
- _spark.sessionState.catalog.reset()
106
- } finally {
107
- _spark.stop()
108
- _spark = null
109
- }
100
+ if (_spark != null ) {
101
+ try {
102
+ _spark.sessionState.catalog.reset()
103
+ } finally {
104
+ _spark.stop()
105
+ _spark = null
110
106
}
111
107
}
112
108
} finally {
You can’t perform that action at this time.
0 commit comments