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

chore: fix compilation on master #5190

Merged
merged 1 commit into from Nov 13, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
32 changes: 16 additions & 16 deletions tokio/tests/sync_mpsc_weak.rs
Expand Up @@ -210,16 +210,16 @@ async fn test_msgs_dropped_on_rx_drop() {
}

// Tests that a `WeakSender` is upgradeable when other `Sender`s exist.
#[tokio::test]
async fn downgrade_upgrade_sender_success() {
#[test]
fn downgrade_upgrade_sender_success() {
let (tx, _rx) = mpsc::channel::<i32>(1);
let weak_tx = tx.downgrade();
assert!(weak_tx.upgrade().is_some());
}

// Tests that a `WeakSender` fails to upgrade when no other `Sender` exists.
#[tokio::test]
async fn downgrade_upgrade_sender_failure() {
#[test]
fn downgrade_upgrade_sender_failure() {
let (tx, _rx) = mpsc::channel::<i32>(1);
let weak_tx = tx.downgrade();
drop(tx);
Expand All @@ -228,8 +228,8 @@ async fn downgrade_upgrade_sender_failure() {

// Tests that a `WeakSender` cannot be upgraded after a `Sender` was dropped,
// which existed at the time of the `downgrade` call.
#[tokio::test]
async fn downgrade_drop_upgrade() {
#[test]
fn downgrade_drop_upgrade() {
let (tx, _rx) = mpsc::channel::<i32>(1);

// the cloned `Tx` is dropped right away
Expand Down Expand Up @@ -261,8 +261,8 @@ async fn downgrade_upgrade_get_permit_no_senders() {
}

// Tests that `downgrade` does not change the `tx_count` of the channel.
#[tokio::test]
async fn test_tx_count_weak_sender() {
#[test]
fn test_tx_count_weak_sender() {
let (tx, _rx) = mpsc::channel::<i32>(1);
let tx_weak = tx.downgrade();
let tx_weak2 = tx.downgrade();
Expand Down Expand Up @@ -472,17 +472,17 @@ async fn test_msgs_dropped_on_unbounded_rx_drop() {

// Tests that an `WeakUnboundedSender` is upgradeable when other
// `UnboundedSender`s exist.
#[tokio::test]
async fn downgrade_upgrade_unbounded_sender_success() {
#[test]
fn downgrade_upgrade_unbounded_sender_success() {
let (tx, _rx) = mpsc::unbounded_channel::<i32>();
let weak_tx = tx.downgrade();
assert!(weak_tx.upgrade().is_some());
}

// Tests that a `WeakUnboundedSender` fails to upgrade when no other
// `UnboundedSender` exists.
#[tokio::test]
async fn downgrade_upgrade_unbounded_sender_failure() {
#[test]
fn downgrade_upgrade_unbounded_sender_failure() {
let (tx, _rx) = mpsc::unbounded_channel::<i32>();
let weak_tx = tx.downgrade();
drop(tx);
Expand All @@ -491,8 +491,8 @@ async fn downgrade_upgrade_unbounded_sender_failure() {

// Tests that an `WeakUnboundedSender` cannot be upgraded after an
// `UnboundedSender` was dropped, which existed at the time of the `downgrade` call.
#[tokio::test]
async fn downgrade_drop_upgrade_unbounded() {
#[test]
fn downgrade_drop_upgrade_unbounded() {
let (tx, _rx) = mpsc::unbounded_channel::<i32>();

// the cloned `Tx` is dropped right away
Expand All @@ -502,8 +502,8 @@ async fn downgrade_drop_upgrade_unbounded() {
}

// Tests that `downgrade` does not change the `tx_count` of the channel.
#[tokio::test]
async fn test_tx_count_weak_unbounded_sender() {
#[test]
fn test_tx_count_weak_unbounded_sender() {
let (tx, _rx) = mpsc::unbounded_channel::<i32>();
let tx_weak = tx.downgrade();
let tx_weak2 = tx.downgrade();
Expand Down