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

Rework YamlIntegrationTests to not use inheritance #3083

Draft
wants to merge 16 commits into
base: main
Choose a base branch
from

Conversation

ScottDugas
Copy link
Collaborator

The inheritance tree makes it hard to add, or mix configurations. It also makes it impossible to have dynamically generated configurations (e.g. run mixed-mode with all of a bunch of different old versions). At some point it would also make it cumbersome, as all the tests have to live in one place.

The key thing here is the introduction of @YamlTest annotation which provides contexts for @TestTemplate, and is configured to run with a bunch of different YamlTestConfigs.

You may find this easier to review commit-by-commit. Or maybe not. The commits are pretty sensible, although a bunch of the classes don't get javadoc until the very end.

I left YamlTestBase, so I think this should be backwards-compatible, but I expect to remove that soon.

This just adds one config, and copies one test using it.
This fixes a spotbugs error. MultiServerConnectionFactory still
has a problem of not closing, in theory, and that will probably
need to be resolved too, as that gets brought into "production"
code.
This is basically the same as JDBCInProcessYamlIntegrationTests
except we don't wrap the exception in the afterAll
Just moving the code into a different class
This required running two servers with separate ports.
I could have had them try to share an external server, but this
seems simpler, especially if we later have configs that run with
extra versions of the server.
Not everything is supported JDBC yet, so we need the ability to
skip some tests.
It seemed clearer to do it from the config side, so you can easily
see what is not supported for a config. The configs that are not
supported for a test will be visible when you run the test.
This allows deleting all the other implementations.
YamlTestBase still exists as it is used for the supported_version
tests
A lot of times (I assume) people will want to test changes to the
relational core, or record-layer core, and will want faster tests
then running all of the configs. This will allow easily doing so
in intelliJ with a new `quickTest` target when you got o run a
test.
The quickTest target is not run as part of `./gradlew build`, it
has to be explicitly requested, so we won't get redundant test runs
in our CI.
This allows other projects to use @yamltest exclude some of their
tests from some configs.
@foundationdb-ci
Copy link
Contributor

Result of fdb-record-layer-pr on Linux CentOS 7

  • Commit ID: 77b95b8
  • Duration 0:57:41
  • Result: ✅ SUCCEEDED
  • Error: N/A
  • Build Log terminal output (available for 30 days)
  • Build Workspace zip file of the working directory (available for 30 days)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants