Skip to content

@ExpectMaxJdbcQueryExecution

Jean Bisutti edited this page Nov 18, 2020 · 1 revision

The ExpectMaxJdbcQueryExecution annotation verifies the maximum number of JDBC query executions (executeQuery, executeUpdate, execute, executeLargeUpdate, executeBatch, executeLargeBatch). See datasource-proxy user guide about JDBC query executions.

Each JDBC execution triggers one or several JDBC roundtrips. For example, if a SELECT statement returns a row number greater than JDBC fetch size, the retrieval of all rows will need several JDBC roundtrips.

See also the ExpectJdbcQueryExecution annotation.

πŸ”§ Elements

Name Type Meaning Default value
value int Max JDBC query execution 0

πŸ”Ž Example

    @ExpectMaxJdbcQueryExecution(2)
    @Test
    public void execute_2_inserts() {	
     //...
    }

Annotations

πŸ‘‰ Β Core

πŸ‘‰ Β JVM

πŸ‘‰ Β SQL

πŸ‘‰ Β Scopes

πŸ‘‰ Β Create an annotation

Supported frameworks

πŸ‘‰ Β JUnit 4

πŸ‘‰ Β JUnit 5

πŸ‘‰ Β TestNG

πŸ‘‰ Β Spring

How to

πŸ‘‰ Β Detect and fix N+1 SELECT

Project examples

πŸ‘‰ Β Maven performance

πŸ‘‰ Β Spring Boot - JUnit 4

πŸ‘‰ Β Spring Boot - JUnit 5

πŸ‘‰ Β Micronaut Data - JUnit 5

πŸ‘‰ Β Micronaut - Spring - JUnit 5

πŸ‘‰ Β Quarkus - JUnit 5

Miscellaneous

πŸ‘‰ Β FAQ

πŸ‘‰ Β QuickPerf code

Clone this wiki locally