Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a lenient mode to @ExpectJdbcBatching #144

Open
jeanbisutti opened this issue Dec 18, 2020 · 1 comment
Open

Add a lenient mode to @ExpectJdbcBatching #144

jeanbisutti opened this issue Dec 18, 2020 · 1 comment
Labels
✨ feature New feature or request sql SQL annotations

Comments

@jeanbisutti
Copy link
Collaborator

Today, @ExpectJdbcBatching makes a test fails if INSERT, UPDATE or DELETE statements are executed without JDBC batching.

This issue follows #132. It aims to add a boolean lenient element to ExpectJdbcbatching annotation. The default value will be false.

With a true value, the test will not fail if the batch size would be less than two with JDBC batching. For example, if just one INSERT is executed without JDBC batching, the test will not fail.

@jeanbisutti jeanbisutti added ✨ feature New feature or request sql SQL annotations labels Dec 18, 2020
@jeanbisutti jeanbisutti added this to the 1.1 milestone Dec 18, 2020
@gmarziou
Copy link

This looks great.
However, I wonder whether true/false is enough or a numerical threshold would cover more use cases.

@jeanbisutti jeanbisutti removed this from the 1.1 milestone Sep 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨ feature New feature or request sql SQL annotations
Projects
None yet
Development

No branches or pull requests

2 participants