Skip to content

Commit 8c95a37

Browse files
committed
result
1 parent 03b4ab7 commit 8c95a37

File tree

11 files changed

+93
-91
lines changed

11 files changed

+93
-91
lines changed

src/build_queue.rs

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -743,7 +743,7 @@ mod tests {
743743
.max_queued_rebuilds(Some(100))
744744
.build()?,
745745
)
746-
.await;
746+
.await?;
747747

748748
env.fake_release()
749749
.await
@@ -777,7 +777,7 @@ mod tests {
777777
.max_queued_rebuilds(Some(1))
778778
.build()?,
779779
)
780-
.await;
780+
.await?;
781781

782782
let build_queue = env.async_build_queue();
783783
build_queue
@@ -819,7 +819,7 @@ mod tests {
819819
.max_queued_rebuilds(Some(1))
820820
.build()?,
821821
)
822-
.await;
822+
.await?;
823823

824824
let build_queue = env.async_build_queue();
825825
build_queue
@@ -852,7 +852,7 @@ mod tests {
852852

853853
#[tokio::test(flavor = "multi_thread")]
854854
async fn test_add_duplicate_doesnt_fail_last_priority_wins() -> Result<()> {
855-
let env = TestEnvironment::new().await;
855+
let env = TestEnvironment::new().await?;
856856

857857
let queue = env.async_build_queue();
858858

@@ -870,7 +870,7 @@ mod tests {
870870
async fn test_add_duplicate_resets_attempts_and_priority() -> Result<()> {
871871
let env =
872872
TestEnvironment::with_config(TestEnvironment::base_config().build_attempts(5).build()?)
873-
.await;
873+
.await?;
874874

875875
let queue = env.async_build_queue();
876876

@@ -907,7 +907,7 @@ mod tests {
907907

908908
#[tokio::test(flavor = "multi_thread")]
909909
async fn test_has_build_queued() -> Result<()> {
910-
let env = TestEnvironment::new().await;
910+
let env = TestEnvironment::new().await?;
911911

912912
let queue = env.async_build_queue();
913913

@@ -933,7 +933,7 @@ mod tests {
933933
.build_attempts(99)
934934
.delay_between_build_attempts(Duration::from_secs(1))
935935
.build()?,
936-
);
936+
)?;
937937

938938
let runtime = env.runtime();
939939

@@ -984,7 +984,7 @@ mod tests {
984984
.build_attempts(MAX_ATTEMPTS)
985985
.delay_between_build_attempts(Duration::ZERO)
986986
.build()?,
987-
);
987+
)?;
988988

989989
let queue = env.build_queue();
990990

@@ -1075,7 +1075,7 @@ mod tests {
10751075
.cloudfront_distribution_id_web(Some("distribution_id_web".into()))
10761076
.cloudfront_distribution_id_static(Some("distribution_id_static".into()))
10771077
.build()?,
1078-
);
1078+
)?;
10791079

10801080
let queue = env.build_queue();
10811081

@@ -1125,7 +1125,7 @@ mod tests {
11251125

11261126
#[test]
11271127
fn test_pending_count() -> Result<()> {
1128-
let env = TestEnvironment::new_with_runtime();
1128+
let env = TestEnvironment::new_with_runtime()?;
11291129

11301130
let queue = env.build_queue();
11311131

@@ -1148,7 +1148,7 @@ mod tests {
11481148

11491149
#[test]
11501150
fn test_prioritized_count() -> Result<()> {
1151-
let env = TestEnvironment::new_with_runtime();
1151+
let env = TestEnvironment::new_with_runtime()?;
11521152

11531153
let queue = env.build_queue();
11541154

@@ -1171,7 +1171,7 @@ mod tests {
11711171

11721172
#[test]
11731173
fn test_count_by_priority() -> Result<()> {
1174-
let env = TestEnvironment::new_with_runtime();
1174+
let env = TestEnvironment::new_with_runtime()?;
11751175

11761176
let queue = env.build_queue();
11771177

@@ -1201,7 +1201,7 @@ mod tests {
12011201
.build_attempts(MAX_ATTEMPTS)
12021202
.delay_between_build_attempts(Duration::ZERO)
12031203
.build()?,
1204-
);
1204+
)?;
12051205

12061206
const MAX_ATTEMPTS: u16 = 3;
12071207

@@ -1240,7 +1240,7 @@ mod tests {
12401240
.build_attempts(MAX_ATTEMPTS)
12411241
.delay_between_build_attempts(Duration::ZERO)
12421242
.build()?,
1243-
);
1243+
)?;
12441244

12451245
const MAX_ATTEMPTS: u16 = 3;
12461246

@@ -1271,7 +1271,7 @@ mod tests {
12711271

12721272
#[test]
12731273
fn test_queued_crates() -> Result<()> {
1274-
let env = TestEnvironment::new_with_runtime();
1274+
let env = TestEnvironment::new_with_runtime()?;
12751275

12761276
let queue = env.build_queue();
12771277

@@ -1302,7 +1302,7 @@ mod tests {
13021302

13031303
#[test]
13041304
fn test_last_seen_reference_in_db() -> Result<()> {
1305-
let env = TestEnvironment::new_with_runtime();
1305+
let env = TestEnvironment::new_with_runtime()?;
13061306

13071307
let queue = env.build_queue();
13081308
queue.unlock()?;
@@ -1324,7 +1324,7 @@ mod tests {
13241324

13251325
#[test]
13261326
fn test_broken_db_reference_breaks() -> Result<()> {
1327-
let env = TestEnvironment::new_with_runtime();
1327+
let env = TestEnvironment::new_with_runtime()?;
13281328

13291329
env.runtime().block_on(async {
13301330
let mut conn = env.async_db().async_conn().await;
@@ -1341,7 +1341,7 @@ mod tests {
13411341

13421342
#[test]
13431343
fn test_queue_lock() -> Result<()> {
1344-
let env = TestEnvironment::new_with_runtime();
1344+
let env = TestEnvironment::new_with_runtime()?;
13451345

13461346
let queue = env.build_queue();
13471347
// unlocked without config
@@ -1358,7 +1358,7 @@ mod tests {
13581358

13591359
#[test]
13601360
fn test_add_long_name() -> Result<()> {
1361-
let env = TestEnvironment::new_with_runtime();
1361+
let env = TestEnvironment::new_with_runtime()?;
13621362

13631363
let queue = env.build_queue();
13641364

@@ -1376,7 +1376,7 @@ mod tests {
13761376

13771377
#[test]
13781378
fn test_add_long_version() -> Result<()> {
1379-
let env = TestEnvironment::new_with_runtime();
1379+
let env = TestEnvironment::new_with_runtime()?;
13801380

13811381
let queue = env.build_queue();
13821382

src/cdn.rs

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -708,7 +708,7 @@ mod tests {
708708
.cdn_backend(CdnKind::CloudFront)
709709
.build()?,
710710
)
711-
.await;
711+
.await?;
712712

713713
assert!(matches!(*env.cdn(), CdnBackend::CloudFront { .. }));
714714
assert!(matches!(
@@ -719,19 +719,20 @@ mod tests {
719719
}
720720

721721
#[tokio::test(flavor = "multi_thread")]
722-
async fn create_dummy() {
723-
let env = TestEnvironment::new().await;
722+
async fn create_dummy() -> Result<()> {
723+
let env = TestEnvironment::new().await?;
724724

725725
assert!(matches!(*env.cdn(), CdnBackend::Dummy { .. }));
726726
assert!(matches!(
727727
CdnBackend::new(env.config()).await,
728728
CdnBackend::Dummy { .. }
729729
));
730+
Ok(())
730731
}
731732

732733
#[tokio::test(flavor = "multi_thread")]
733734
async fn invalidation_counts_are_zero_with_empty_queue() -> Result<()> {
734-
let env = TestEnvironment::with_config(config_with_cdn().build()?).await;
735+
let env = TestEnvironment::with_config(config_with_cdn().build()?).await?;
735736

736737
let config = env.config();
737738
let mut conn = env.async_db().async_conn().await;
@@ -757,7 +758,7 @@ mod tests {
757758
.cdn_max_queued_age(Duration::from_secs(0))
758759
.build()?,
759760
)
760-
.await;
761+
.await?;
761762

762763
let cdn = env.cdn();
763764
let config = env.config();
@@ -859,7 +860,7 @@ mod tests {
859860

860861
#[tokio::test(flavor = "multi_thread")]
861862
async fn invalidate_a_crate() -> Result<()> {
862-
let env = TestEnvironment::with_config(config_with_cdn().build()?).await;
863+
let env = TestEnvironment::with_config(config_with_cdn().build()?).await?;
863864

864865
let cdn = env.cdn();
865866
let config = env.config();
@@ -990,7 +991,7 @@ mod tests {
990991

991992
#[tokio::test(flavor = "multi_thread")]
992993
async fn only_add_some_invalidations_when_too_many_are_active() -> Result<()> {
993-
let env = TestEnvironment::with_config(config_with_cdn().build()?).await;
994+
let env = TestEnvironment::with_config(config_with_cdn().build()?).await?;
994995

995996
let cdn = env.cdn();
996997

@@ -1064,7 +1065,7 @@ mod tests {
10641065

10651066
#[tokio::test(flavor = "multi_thread")]
10661067
async fn dont_create_invalidations_when_too_many_are_active() -> Result<()> {
1067-
let env = TestEnvironment::with_config(config_with_cdn().build()?).await;
1068+
let env = TestEnvironment::with_config(config_with_cdn().build()?).await?;
10681069

10691070
let cdn = env.cdn();
10701071

@@ -1153,7 +1154,7 @@ mod tests {
11531154

11541155
#[tokio::test(flavor = "multi_thread")]
11551156
async fn dont_create_invalidations_without_paths() -> Result<()> {
1156-
let env = TestEnvironment::with_config(config_with_cdn().build()?).await;
1157+
let env = TestEnvironment::with_config(config_with_cdn().build()?).await?;
11571158

11581159
let cdn = env.cdn();
11591160

src/docbuilder/limits.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ mod test {
160160
.build_default_memory_limit(Some(6 * GB))
161161
.build()?,
162162
)
163-
.await;
163+
.await?;
164164

165165
let db = env.async_db();
166166
let mut conn = db.async_conn().await;

0 commit comments

Comments
 (0)