-
Notifications
You must be signed in to change notification settings - Fork 18
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 testsuite #60
Merged
Merged
Add testsuite #60
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The existing "stress tests" forms the initial test suite, while the remaining executables, which takes an extra OCAML_MARIADB_QUERY environment variable, are considered examples.
The blocking tests were duplicates of corresponding non-blocking tests. This commit replaces it with a merged concurrency-less main which instantiates the test suite twice, once using the blocking API and once using the non-blocking API.
Merged
paurkedal
added a commit
to paurkedal/opam-repository
that referenced
this pull request
Nov 28, 2024
CHANGES: - Added `Stmt.start_txn` (ocaml-community/ocaml-mariadb#59 by Corentin Leruth). - Added `Res.insert_id` as binding for `mysql_stmt_insert_id` (ocaml-community/ocaml-mariadb#58 by Corentin Leruth). - Updated to support recent OCaml versions (ocaml-community/ocaml-mariadb#45 by @kit-ty-kate). - Fixed too-early retrieval of statement metadata (ocaml-community/ocaml-mariadb#41 by Albert Peschar). - Fixed decoding bug for the integer type (ocaml-community/ocaml-mariadb#54 by Raman Varabets, tested by ocaml-community/ocaml-mariadb#61 by Corentin Leruth). - Fixed a memory leaks related to result metadata (ocaml-community/ocaml-mariadb#39 by Albert Peschar). - The build system is now dune and dune-configurator (ocaml-community/ocaml-mariadb#52 by Petter A. Urkedal) and some of the examples have been converted to a test suite (ocaml-community/ocaml-mariadb#60 by Petter A. Urkedal). - The project has been transferred to ocaml-community with Petter A. Urkedal as the new maintainer.
paurkedal
added a commit
to paurkedal/opam-repository
that referenced
this pull request
Nov 28, 2024
CHANGES: - Added `Stmt.start_txn` (ocaml-community/ocaml-mariadb#59 by Corentin Leruth). - Added `Res.insert_id` as binding for `mysql_stmt_insert_id` (ocaml-community/ocaml-mariadb#58 by Corentin Leruth). - Updated to support recent OCaml versions (ocaml-community/ocaml-mariadb#45 by @kit-ty-kate). - Fixed too-early retrieval of statement metadata (ocaml-community/ocaml-mariadb#41 by Albert Peschar). - Fixed decoding bug for the integer type (ocaml-community/ocaml-mariadb#54 by Raman Varabets, tested by ocaml-community/ocaml-mariadb#61 by Corentin Leruth). - Fixed a memory leaks related to result metadata (ocaml-community/ocaml-mariadb#39 by Albert Peschar). - The build system is now dune and dune-configurator (ocaml-community/ocaml-mariadb#52 by Petter A. Urkedal) and some of the examples have been converted to a test suite (ocaml-community/ocaml-mariadb#60 by Petter A. Urkedal). - The project has been transferred to ocaml-community with Petter A. Urkedal as the new maintainer.
paurkedal
added a commit
to paurkedal/opam-repository
that referenced
this pull request
Nov 29, 2024
CHANGES: - Added `Stmt.start_txn` (ocaml-community/ocaml-mariadb#59 by Corentin Leruth). - Added `Res.insert_id` as binding for `mysql_stmt_insert_id` (ocaml-community/ocaml-mariadb#58 by Corentin Leruth). - Updated to support recent OCaml versions (ocaml-community/ocaml-mariadb#45 by @kit-ty-kate). - Fixed too-early retrieval of statement metadata (ocaml-community/ocaml-mariadb#41 by Albert Peschar). - Fixed decoding bug for the integer type (ocaml-community/ocaml-mariadb#54 by Raman Varabets, tested by ocaml-community/ocaml-mariadb#61 by Corentin Leruth). - Fixed a memory leaks related to result metadata (ocaml-community/ocaml-mariadb#39 by Albert Peschar). - The build system is now dune and dune-configurator (ocaml-community/ocaml-mariadb#52 by Petter A. Urkedal) and some of the examples have been converted to a test suite (ocaml-community/ocaml-mariadb#60 by Petter A. Urkedal). - The project has been transferred to ocaml-community with Petter A. Urkedal as the new maintainer.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is my proposal for a proper test suite. It uses the "stress-tests" as a starting point, and which I have extended with tests for #58 and #59. The main problem with the current state is that examples and tests are mixed making it unclear for contributors where to add tests. (The excluded "examples" are not directly usable as tests, since they require the query to the passed via an environment variable, and the query takes a different number of parameter in different examples.)
I noticed that blocking tests are covered by non-blocking tests and that
Mariadb.S is Mariadb.Nonblocking.S with type 'a future := 'a
, so a subsequent commit unifies them. (We could utilize that to simplify the interfaces and extend documentation to the non-blocking interface, but not is this PR.)I am open to other suggestions for changing the directory layout and names.