-
Notifications
You must be signed in to change notification settings - Fork 97
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
External solver support in e2e tests #2515
External solver support in e2e tests #2515
Conversation
LG. However, can't currently approve it since the forked node tests fail locally for some reason(even on the |
Thanks! Forked node tests are working locally for me on the latest commit on my branch (just merged main in). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code looks correct although a bit sketchy.
I think eventually we need to find a way to configure these CLI arguments more reasonably but this is probably a bigger endeavor.
crates/e2e/src/setup/services.rs
Outdated
@@ -193,13 +193,15 @@ impl<'a> Services<'a> { | |||
} | |||
|
|||
/// Starts a basic version of the protocol with a single legacy solver and | |||
/// quoter. | |||
/// quoter. Optionally starts a baseline solver and uses it for price | |||
/// estimation. | |||
pub async fn start_protocol_legacy_solver( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This function is not used in our code base. Given that we are transitioning towards dropping the legacy API are you still using this function?
If not we should just delete it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right, thanks! We don't need it anymore. Deleted in my new commit.
I agree, there's too much string manipulation for my liking. I think something along the lines of a builder pattern to scaffold the arguments to the services would be best. Do you have some other ideas? If so, I'd be happy to do it in a follow-up PR. |
Description
A new function
start_protocol_external_solver
is created which allows e2e tests to easily setup the protocol with an external solver that uses the new solver API.Changes
start_protocol_external_solver
functionrun_baseline
flag to thestart_protocol
functions that use external solvers, which if set to true will also run a baseline solver alongside the external solver.How to test