-
Notifications
You must be signed in to change notification settings - Fork 235
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
query-tests-setup: lift constraints on ConnectorTag (#4159)
In the effort to run connector-test-kit-rs with the new node-based drivers, we want to dispatch requests to an external process when running the query engine test suite. This is naturally implemented with a new type that shells out to that external process to implement `ConnectorTagInterface`. Since we do not want to start a new process every time `ConnectorTag::try_from()` is called (at least once per test) and we are going to want asynchronous communication with the child process (required by some tests), we have to change the entry points that construct `ConnectorTag`s. We will need either a static method on `ConnectorTagInterface` (forbidden by enum_dispatch) or separate connector instantiation (sync, from the tag strings) from initialization (async, will involve IO). Changes in this PR ================== The first entry point is the `TryFrom<(&str, Option<&str>)>` impl for `ConnectorTag`. It is replaced by a `TryFrom<(&str, Option<&str>)>` impl for `ConnectorVersion`. There is no longer a shared responsibility: `ConnectorVersion` is the exhaustive view of the connectors to test that the test suite knows about, and `ConnectorTagInterface` is a bag of connector-specific functions. This lets us remove the `enum_dispatch` dependency, which helps because it was another thing preventing defining static methods on `ConnectorTagInterface`. The second entrypoint is `ConnectorTag::all()`, which turned out to be dead code, so this commit removes it. If you look at the diff, these two changes add up to a nice amount of deleted code in query-tests-setup, and more importantly, a less constraining interface to implement for a connector tag that will need async initialization.
- Loading branch information
Showing
28 changed files
with
397 additions
and
733 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Oops, something went wrong.