@@ -51,8 +51,8 @@ class FsHistoryProviderSuite extends FunSuite with BeforeAndAfter with Matchers
5151 // Write a new-style application log.
5252 val logFile1 = new File (testDir, " new1" )
5353 writeFile(logFile1, true , None ,
54- SparkListenerApplicationStart (" app1-1" , None , 1L , " test" ),
55- SparkListenerApplicationEnd (2L )
54+ SparkListenerApplicationStart (" app1-1" , None , 2L , " test" ),
55+ SparkListenerApplicationEnd (3L )
5656 )
5757
5858 // Write an unfinished app, new-style.
@@ -66,8 +66,8 @@ class FsHistoryProviderSuite extends FunSuite with BeforeAndAfter with Matchers
6666 oldLog.mkdir()
6767 createEmptyFile(new File (oldLog, provider.SPARK_VERSION_PREFIX + " 1.0" ))
6868 writeFile(new File (oldLog, provider.LOG_PREFIX + " 1" ), false , None ,
69- SparkListenerApplicationStart (" app3" , None , 2L , " test" ),
70- SparkListenerApplicationEnd (3L )
69+ SparkListenerApplicationStart (" app3" , None , 1L , " test" ),
70+ SparkListenerApplicationEnd (4L )
7171 )
7272 createEmptyFile(new File (oldLog, provider.APPLICATION_COMPLETE ))
7373
@@ -182,9 +182,7 @@ class FsHistoryProviderSuite extends FunSuite with BeforeAndAfter with Matchers
182182 }
183183
184184 test(" SPARK-5582: empty log directory" ) {
185- val conf = new SparkConf ()
186- .set(" spark.history.fs.logDirectory" , testDir.getAbsolutePath())
187- val provider = new FsHistoryProvider (conf)
185+ val provider = new FsHistoryProvider (createTestConf())
188186
189187 val logFile1 = new File (testDir, " app1" + EventLoggingListener .IN_PROGRESS )
190188 writeFile(logFile1, true , None ,
0 commit comments