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

flaky test test_write_and_read_file #2103

Closed
amitksingh1490 opened this issue Jun 4, 2024 · 5 comments · Fixed by #2199
Closed

flaky test test_write_and_read_file #2103

amitksingh1490 opened this issue Jun 4, 2024 · 5 comments · Fixed by #2199

Comments

@amitksingh1490
Copy link
Collaborator

Test named test_write_and_read_file in file.rs is flaky and fails on ci some times.

Example:
https://github.com/tailcallhq/tailcall/actions/runs/9316192985/job/25643905055

Stack Trace

---- cli::runtime::file::tests::test_write_and_read_file stdout ----
thread 'cli::runtime::file::tests::test_write_and_read_file' panicked at src/cli/runtime/file.rs:79:9:
assertion `left == right` failed
  left: ""
 right: "Hello, world!"
stack backtrace:
   0: rust_begin_unwind
   1: __covrec_BF01945B221EED38u
   2: __covrec_EC1AE97926C6E284u
   3: __covrec_E9842BD590D53805u
   4: __covrec_3600712F3B5F8CE1u
   5: <core::pin::Pin<&mut dyn core::future::future::Future<Output = ()>> as core::future::future::Future>::poll
   6: <core::pin::Pin<&mut core::pin::Pin<&mut dyn core::future::future::Future<Output = ()>>> as core::future::future::Future>::poll
   7: __covrec_BB03F3A8C5336052u
   8: __covrec_16E12C22D05F15F4u
   9: __covrec_FA59F5793EF53AF
  10: __covrec_DF907E706CAD9331u
  11: __covrec_A919FF54DFA24FC3u
  12: __covrec_E7397DA25969E6FE
  13: __covrec_6A9DD44DA5C1F2F9u
  14: <std::thread::local::LocalKey<tokio::runtime::context::Context>>::try_with::<tokio::runtime::context::set_scheduler<(alloc::boxed::Box<tokio::runtime::scheduler::current_thread::Core>, core::option::Option<()>), <tokio::runtime::scheduler::current_thread::CoreGuard>::enter<<tokio::runtime::scheduler::current_thread::CoreGuard>::block_on<core::pin::Pin<&mut core::pin::Pin<&mut dyn core::future::future::Future<Output = ()>>>>::{closure#0}, core::option::Option<()>>::{closure#0}>::{closure#0}, (alloc::boxed::Box<tokio::runtime::scheduler::current_thread::Core>, core::option::Option<()>)>
  15: <std::thread::local::LocalKey<tokio::runtime::context::Context>>::with::<tokio::runtime::context::set_scheduler<(alloc::boxed::Box<tokio::runtime::scheduler::current_thread::Core>, core::option::Option<()>), <tokio::runtime::scheduler::current_thread::CoreGuard>::enter<<tokio::runtime::scheduler::current_thread::CoreGuard>::block_on<core::pin::Pin<&mut core::pin::Pin<&mut dyn core::future::future::Future<Output = ()>>>>::{closure#0}, core::option::Option<()>>::{closure#0}>::{closure#0}, (alloc::boxed::Box<tokio::runtime::scheduler::current_thread::Core>, core::option::Option<()>)>
  16: __covrec_F34D987229BF3576
  17: __covrec_62469D46E1D274F3
  18: __covrec_7022E92503DEFDD7
  19: __covrec_A04B46F8831788A9u
  20: __covrec_A5D8CAAA7D9F1FDAu
  21: __covrec_B2996CA60B[396](https://github.com/tailcallhq/tailcall/actions/runs/9316192985/job/25643905055#step:10:397)2A0
  22: __covrec_11CDFE083A51721B
  23: __covrec_E29454848C28B81A
  24: tailcall::cli::runtime::file::tests::test_write_and_read_file::{closure#0}
  25: <tailcall::cli::runtime::file::tests::test_write_and_read_file::{closure#0} as core::ops::function::FnOnce<()>>::call_once
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.


failures:
    cli::runtime::file::tests::test_write_and_read_file

test result: FAILED. 348 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out; finished in 2.08s
@tusharmath
Copy link
Contributor

/bounty 50$

Please identify the problem and then propose a solution on discord.

Copy link

algora-pbc bot commented Jun 15, 2024

💎 $50 bounty • Tailcall Inc.

Steps to solve:

  1. Start working: Comment /attempt #2103 with your implementation plan
  2. Submit work: Create a pull request including /claim #2103 in the PR body to claim the bounty
  3. Receive payment: 100% of the bounty is received 2-5 days post-reward. Make sure you are eligible for payouts

🙏 Thank you for contributing to tailcallhq/tailcall!
🧐 Checkout our guidelines before you get started.

Attempt Started (GMT+0) Solution
🟢 @ssddOnTop #2199

@ssddOnTop
Copy link
Member

it's coz of temp dir crate.. it's unable to create a temp file sometimes

we can remove the test coz we don't need to test tokio::fs

Copy link

algora-pbc bot commented Jun 15, 2024

💡 @ssddOnTop submitted a pull request that claims the bounty. You can visit your bounty board to reward.

Copy link

algora-pbc bot commented Jun 15, 2024

🎉🎈 @ssddOnTop has been awarded $50! 🎈🎊

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

Successfully merging a pull request may close this issue.

3 participants