dkropachev opened a new pull request, #1384:
URL: https://github.com/apache/cassandra-spark-connector/pull/1384

   ## Summary
   
   - Move database initialization from class constructor body into 
`beforeClass` in 8 integration test specs, bringing it under the existing 
`wrapUnserializableExceptions` protection
   - Convert dependent `val` declarations to `lazy val` so they evaluate after 
`beforeClass` completes
   
   ## Root Cause
   
   `SparkCassandraITSpecBase` wraps `beforeClass`/`afterAll`/`withFixture` with 
`wrapUnserializableExceptions()` to handle non-serializable driver exceptions 
in ScalaTest's forked test reporter. However, 8 test specs had 
`conn.withSessionDo { ... }` blocks running directly in the class body (during 
construction), bypassing this protection entirely.
   
   When the ScyllaDB driver throws `AllNodesFailedException` containing a 
non-serializable `ShardingInfo` reference, the forked reporter fails to 
serialize the `SuiteAborted` event, causing CI exit code 2 despite all 434 
tests passing.
   
   Upstream issue for making `ShardingInfo` serializable: 
scylladb/java-driver#805
   
   ## Affected Files
   
   - `CassandraRDDSpec` - largest init block (lines 86-333)
   - `SchemaSpec`
   - `TokenGeneratorSpec`
   - `CassandraDataFrameMetadataSpec`
   - `CassandraDataFrameSelectUdtSpec`
   - `MultiThreadedSpec`
   - `BoundStatementBuilderSpec`
   - `GroupingBatchBuilderSpec`
   
   ## Test plan
   
   - [x] `sbt compile` passes
   - [x] `sbt it:compile` passes
   - [ ] Integration tests pass on Scylla CI (same results, no exit code 2)
   
   Fixes #38


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

To unsubscribe, e-mail: [email protected]

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