attilapiros opened a new pull request #31824:
URL: https://github.com/apache/spark/pull/31824


   
   ### What changes were proposed in this pull request?
   
   Fixing `IndexOutOfBoundsException` in `logForFailedTest` method when driver 
is not started.
   
   ### Why are the changes needed?
   
   Before this PR when the driver is not started an `IndexOutOfBoundsException` 
as the first item is tried to be accessed from an empty list:
   
   ```
   - PVs with local storage *** FAILED ***
     java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
     at java.util.ArrayList.rangeCheck(ArrayList.java:659)
     at java.util.ArrayList.get(ArrayList.java:435)
     at 
org.apache.spark.deploy.k8s.integrationtest.KubernetesSuite.logForFailedTest(KubernetesSuite.scala:83)
     at org.apache.spark.SparkFunSuite.withFixture(SparkFunSuite.scala:181)
     at 
org.scalatest.funsuite.AnyFunSuiteLike.invokeWithFixture$1(AnyFunSuiteLike.scala:188)
     at 
org.scalatest.funsuite.AnyFunSuiteLike.$anonfun$runTest$1(AnyFunSuiteLike.scala:200)
     at org.scalatest.SuperEngine.runTestImpl(Engine.scala:306)
     at 
org.scalatest.funsuite.AnyFunSuiteLike.runTest(AnyFunSuiteLike.scala:200)
     at 
org.scalatest.funsuite.AnyFunSuiteLike.runTest$(AnyFunSuiteLike.scala:182)
     at 
org.apache.spark.SparkFunSuite.org$scalatest$BeforeAndAfterEach$$super$runTest(SparkFunSuite.scala:61)
     ...
   ```
   
   
   ### Does this PR introduce _any_ user-facing change?
   
   No.
   
   
   ### How was this patch tested?
   
   Running integration tests. 
   After this changes the above error become:
   
   ```
   - PVs with local storage *** FAILED ***
     java.io.IOException: No such file or directory
     at java.io.UnixFileSystem.createFileExclusively(Native Method)
     at java.io.File.createTempFile(File.java:2026)
     at 
org.apache.spark.deploy.k8s.integrationtest.Utils$.createTempFile(Utils.scala:103)
     at 
org.apache.spark.deploy.k8s.integrationtest.PVTestsSuite.$anonfun$$init$$1(PVTestsSuite.scala:135)
     at org.scalatest.OutcomeOf.outcomeOf(OutcomeOf.scala:85)
     at org.scalatest.OutcomeOf.outcomeOf$(OutcomeOf.scala:83)
     at org.scalatest.OutcomeOf$.outcomeOf(OutcomeOf.scala:104)
     at org.scalatest.Transformer.apply(Transformer.scala:22)
     at org.scalatest.Transformer.apply(Transformer.scala:20)
     at 
org.scalatest.funsuite.AnyFunSuiteLike$$anon$1.apply(AnyFunSuiteLike.scala:190)
     ...
   ```
   


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to