Skip to content

Commit 243232f

Browse files
committed
removed async.
1 parent 4367098 commit 243232f

File tree

1 file changed

+18
-26
lines changed
  • opentelemetry-sdk/src/metrics

1 file changed

+18
-26
lines changed

opentelemetry-sdk/src/metrics/mod.rs

Lines changed: 18 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ mod tests {
117117
use self::data::{HistogramDataPoint, ScopeMetrics, SumDataPoint};
118118
use super::data::MetricData;
119119
use super::internal::Number;
120+
use super::view::View;
120121
use super::*;
121122
use crate::metrics::data::ResourceMetrics;
122123
use crate::metrics::internal::AggregatedMetricsAccess;
@@ -133,7 +134,6 @@ mod tests {
133134
use std::sync::{Arc, Mutex};
134135
use std::thread;
135136
use std::time::Duration;
136-
use super::view::View;
137137

138138
// Run all tests in this mod
139139
// cargo test metrics::tests --features=testing,spec_unstable_metrics_views
@@ -1469,8 +1469,8 @@ mod tests {
14691469
);
14701470
}
14711471

1472-
#[tokio::test(flavor = "multi_thread", worker_threads = 1)]
1473-
async fn view_test_rename() {
1472+
#[test]
1473+
fn view_test_rename() {
14741474
test_view_customization(
14751475
|i| {
14761476
if i.name == "my_counter" {
@@ -1483,11 +1483,10 @@ mod tests {
14831483
"my_unit",
14841484
"my_description",
14851485
)
1486-
.await;
14871486
}
14881487

1489-
#[tokio::test(flavor = "multi_thread", worker_threads = 1)]
1490-
async fn view_test_change_unit() {
1488+
#[test]
1489+
fn view_test_change_unit() {
14911490
test_view_customization(
14921491
|i| {
14931492
if i.name == "my_counter" {
@@ -1500,11 +1499,10 @@ mod tests {
15001499
"my_unit_new",
15011500
"my_description",
15021501
)
1503-
.await;
15041502
}
15051503

1506-
#[tokio::test(flavor = "multi_thread", worker_threads = 1)]
1507-
async fn view_test_change_description() {
1504+
#[test]
1505+
fn view_test_change_description() {
15081506
test_view_customization(
15091507
|i| {
15101508
if i.name == "my_counter" {
@@ -1517,11 +1515,10 @@ mod tests {
15171515
"my_unit",
15181516
"my_description_new",
15191517
)
1520-
.await;
15211518
}
15221519

1523-
#[tokio::test(flavor = "multi_thread", worker_threads = 1)]
1524-
async fn view_test_change_name_unit() {
1520+
#[test]
1521+
fn view_test_change_name_unit() {
15251522
test_view_customization(
15261523
|i| {
15271524
if i.name == "my_counter" {
@@ -1534,11 +1531,10 @@ mod tests {
15341531
"my_unit_new",
15351532
"my_description",
15361533
)
1537-
.await;
15381534
}
15391535

1540-
#[tokio::test(flavor = "multi_thread", worker_threads = 1)]
1541-
async fn view_test_change_name_unit_desc() {
1536+
#[test]
1537+
fn view_test_change_name_unit_desc() {
15421538
test_view_customization(
15431539
|i| {
15441540
if i.name == "my_counter" {
@@ -1556,11 +1552,10 @@ mod tests {
15561552
"my_unit_new",
15571553
"my_description_new",
15581554
)
1559-
.await;
15601555
}
15611556

1562-
#[tokio::test(flavor = "multi_thread", worker_threads = 1)]
1563-
async fn view_test_match_unit() {
1557+
#[test]
1558+
fn view_test_match_unit() {
15641559
test_view_customization(
15651560
|i| {
15661561
if i.unit == "my_unit" {
@@ -1573,11 +1568,10 @@ mod tests {
15731568
"my_unit_new",
15741569
"my_description",
15751570
)
1576-
.await;
15771571
}
15781572

1579-
#[tokio::test(flavor = "multi_thread", worker_threads = 1)]
1580-
async fn view_test_match_none() {
1573+
#[test]
1574+
fn view_test_match_none() {
15811575
test_view_customization(
15821576
|i| {
15831577
if i.name == "not_expected_to_match" {
@@ -1590,11 +1584,10 @@ mod tests {
15901584
"my_unit",
15911585
"my_description",
15921586
)
1593-
.await;
15941587
}
15951588

1596-
#[tokio::test(flavor = "multi_thread", worker_threads = 1)]
1597-
async fn view_test_match_multiple() {
1589+
#[test]
1590+
fn view_test_match_multiple() {
15981591
test_view_customization(
15991592
|i| {
16001593
if i.name == "my_counter" && i.unit == "my_unit" {
@@ -1607,11 +1600,10 @@ mod tests {
16071600
"my_unit",
16081601
"my_description",
16091602
)
1610-
.await;
16111603
}
16121604

16131605
/// Helper function to test view customizations
1614-
async fn test_view_customization<F>(
1606+
fn test_view_customization<F>(
16151607
view_function: F,
16161608
expected_name: &str,
16171609
expected_unit: &str,

0 commit comments

Comments
 (0)