FakeKandraSession

class FakeKandraSession : CqlSession

In-memory drop-in replacement for CqlSession — no ScyllaDB connection required.

Captures BatchStatement executions so tests can assert batch behaviour. Use via KandraTestUtils.inMemory to wire a full repository stack without Testcontainers.

Note: Because the DataStax driver's BoundStatement is final, the fake session does not simulate actual query routing. Use it to verify structural behaviour (batch composition, save/delete ordering) rather than data round-trips.

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard
fun capturedBatches(): List<BatchStatement>

Returns all BatchStatement instances that were executed via execute.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override fun close()
Link copied to clipboard
open override fun closeAsync(): CompletionStage<Void>
Link copied to clipboard
open override fun closeFuture(): CompletionStage<Void>
Link copied to clipboard
@NonNull
open fun execute(@NonNull p0: GraphStatement<*>): GraphResultSet
@NonNull
open fun execute(@NonNull p0: String): ResultSet
@NonNull
open fun execute(@NonNull p0: String, @NonNull vararg p1: Any): ResultSet
@NonNull
open fun execute(@NonNull p0: String, @NonNull p1: MutableMap<String, Any>): ResultSet
open override fun execute(statement: Statement<*>): ResultSet
open override fun <RequestT : Request, ResultT : Any> execute(request: RequestT, resultType: GenericType<ResultT>): ResultT?
Link copied to clipboard
@NonNull
open fun executeAsync(@NonNull p0: GraphStatement<*>): CompletionStage<AsyncGraphResultSet>
@NonNull
open fun executeAsync(@NonNull p0: String): CompletionStage<AsyncResultSet>
@NonNull
open fun executeAsync(@NonNull p0: String, @NonNull vararg p1: Any): CompletionStage<AsyncResultSet>
@NonNull
open fun executeAsync(@NonNull p0: String, @NonNull p1: MutableMap<String, Any>): CompletionStage<AsyncResultSet>
open override fun executeAsync(statement: Statement<*>): CompletionStage<AsyncResultSet>
Link copied to clipboard
@NonNull
open fun executeContinuously(@NonNull p0: Statement<*>): ContinuousResultSet
Link copied to clipboard
@NonNull
open fun executeContinuouslyAsync(@NonNull p0: Statement<*>): CompletionStage<ContinuousAsyncResultSet>
Link copied to clipboard
@NonNull
open fun executeContinuouslyReactive(@NonNull p0: Statement<*>): ContinuousReactiveResultSet
@NonNull
open fun executeContinuouslyReactive(@NonNull p0: String): ContinuousReactiveResultSet
Link copied to clipboard
@NonNull
open fun executeReactive(@NonNull p0: Statement<*>): ReactiveResultSet
@NonNull
open fun executeReactive(@NonNull p0: String): ReactiveResultSet
@NonNull
open fun executeReactive(@NonNull p0: String, @NonNull vararg p1: Any): ReactiveResultSet
@NonNull
open fun executeReactive(@NonNull p0: String, @NonNull p1: MutableMap<String, Any>): ReactiveResultSet
@NonNull
open fun executeReactive(@NonNull p0: GraphStatement<*>): ReactiveGraphResultSet
Link copied to clipboard
open override fun forceCloseAsync(): CompletionStage<Void>
Link copied to clipboard
open override fun getContext(): DriverContext
Link copied to clipboard
open override fun getKeyspace(): Optional<CqlIdentifier>
Link copied to clipboard
open override fun getMetadata(): Metadata
Link copied to clipboard
open override fun getMetrics(): Optional<Metrics>
Link copied to clipboard
open override fun getName(): String
Link copied to clipboard
open override fun isClosed(): Boolean
Link copied to clipboard
open override fun isSchemaMetadataEnabled(): Boolean
Link copied to clipboard
@NonNull
open fun prepare(@NonNull p0: PrepareRequest): PreparedStatement
open override fun prepare(statement: SimpleStatement): PreparedStatement
open override fun prepare(query: String): PreparedStatement
Link copied to clipboard
@NonNull
open fun prepareAsync(p0: PrepareRequest): CompletionStage<PreparedStatement>
@NonNull
open fun prepareAsync(@NonNull p0: SimpleStatement): CompletionStage<PreparedStatement>
@NonNull
open fun prepareAsync(@NonNull p0: String): CompletionStage<PreparedStatement>
Link copied to clipboard
@NonNull
open fun refreshSchema(): Metadata
Link copied to clipboard
open override fun refreshSchemaAsync(): CompletionStage<Metadata>
Link copied to clipboard
fun reset(): <Error class: unknown class>

Clears all captured batches.

Link copied to clipboard
open override fun setSchemaMetadataEnabled(newValue: Boolean?): CompletionStage<Metadata>
Link copied to clipboard
fun tableContents(tableName: String): List<Map<String, Any?>>

Returns an empty in-memory table contents list (structural test placeholder).