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

Clean up client<>server synchronization in stream test #485

Closed
wants to merge 1 commit into from

Conversation

jack-kearney
Copy link
Contributor

Summary & Motivation (Problem vs. Solution)

The stream_implements_read_write_traits was failing locally. This makes the server<>client interaction less flakey

How I Tested These Changes

Locally

Pre merge check list

  • Update CHANGELOG.MD

@jack-kearney jack-kearney requested a review from a team as a code owner October 23, 2024 15:31
Copy link
Contributor

@r-n-o r-n-o left a comment

Choose a reason for hiding this comment

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

I'm very surprised that this passes our current clippy lints; indentation seems off in multiple places

Also: what does this mean? Was this test failing on main? Or just locally? (and if it was failing just locally: why was it working correctly on Github CI?)

Comment on lines 374 to 375
str::from_utf8,
sync::{Arc, Barrier},
Copy link
Contributor

Choose a reason for hiding this comment

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

Indentation seems off

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thx fixed

Comment on lines 459 to 461
// thread::spawn(move || {
// server.start();
// });
Copy link
Contributor

Choose a reason for hiding this comment

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

Did you mean to comment this out? I think we can remove this

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed

@jack-kearney
Copy link
Contributor Author

Yeah, I have no idea why it wasn't failing in CI. It was failing for me consistently locally. FWIW I just ran clippy locally and there are several (not too many) errors there as well.

Comment on lines +398 to +402

// Create a barrier to synchronize between server and client
let barrier = Arc::new(Barrier::new(2));
let server_barrier = Arc::clone(&barrier);

Copy link
Contributor

@r-n-o r-n-o Oct 23, 2024

Choose a reason for hiding this comment

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

Same here, indentation is off (tabs vs spaces).

This tabs v space issue is there for all new lines you inserted so it's probably an editor configuration issue.

@r-n-o
Copy link
Contributor

r-n-o commented Nov 12, 2024

I have a simpler fix for this in dd54694 (part of #492). Instead of using synchronization primitives I'm dropping the use of threads in the server, and relying on Drop to perform cleanup based on the underlying file descriptor.

@r-n-o
Copy link
Contributor

r-n-o commented Nov 17, 2024

Closing this PR since the unit test is now stable locally. #492 was merged.

@r-n-o r-n-o closed this Nov 17, 2024
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