Skip to content

Conversation

@WoodenMaiden
Copy link
Contributor

No description provided.

@WoodenMaiden WoodenMaiden marked this pull request as ready for review November 27, 2023 23:24
}

pub async fn register(&mut self, port: u16) -> Result<String> {
#[tonic::async_trait]

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would have used tokio async_trait here

assert_eq!(code_return.exit_code, 1);
}

/// Test the creation of a file

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is that really what it is testing?


string
#[test]
fn run_one_works_with_ouputs_and_code() {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Personally I tend to prefix all test function's names with 'test_' to easily differentiate it from other functions and to make sure that I specify in the name what it is supposed to test


/// Test the creation of a file
#[test]
fn workload_runs_correctly() {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is a workload supposed to be?

}

fn default_workspace_path() -> String {
std::env::temp_dir().to_str().unwrap().to_string()

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.to_str().unwrap().to_string() seems a bit ugly :/


impl LambdoAgentServer {
pub async fn new(config: AgentConfig) -> Self {
pub async fn new<C: ClientTrait + SelfCreatingClientTrait + 'static>(

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I really don't like the idea of a SelfCreatingClientTrait.
For me, we should do that a bit differently:

  • LambdoAgentServer::new() should take a ClientTrait as a parameter
  • ClientTrait should have a config() function that would be called in LambdoAgentServer::new()

That would probably reduce the complexity by a lot IMO

@WoodenMaiden WoodenMaiden self-assigned this Dec 13, 2023
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.

3 participants