@@ -23,6 +23,9 @@ namespace cloud {
23
23
namespace storage_benchmarks {
24
24
namespace {
25
25
26
+ using ::google::cloud::testing_util::StatusIs;
27
+ using ::testing::AnyOf;
28
+
26
29
class ThroughputExperimentIntegrationTest
27
30
: public google::cloud::storage::testing::StorageIntegrationTest,
28
31
public ::testing::WithParamInterface<ApiName> {
@@ -64,11 +67,10 @@ TEST_P(ThroughputExperimentIntegrationTest, Upload) {
64
67
/* enable_crc32c=*/ false ,
65
68
/* enable_md5=*/ false };
66
69
auto result = e->Run (bucket_name_, object_name, config);
67
- EXPECT_STATUS_OK (result.status );
68
- if (result.status .ok ()) {
69
- auto status = client->DeleteObject (bucket_name_, object_name);
70
- EXPECT_STATUS_OK (status);
71
- }
70
+ ASSERT_STATUS_OK (result.status );
71
+ auto status = client->DeleteObject (bucket_name_, object_name);
72
+ EXPECT_THAT (status,
73
+ StatusIs (AnyOf (StatusCode::kOk , StatusCode::kNotFound )));
72
74
}
73
75
}
74
76
@@ -108,7 +110,8 @@ TEST_P(ThroughputExperimentIntegrationTest, Download) {
108
110
(void )e->Run (bucket_name_, object_name, config);
109
111
110
112
auto status = client->DeleteObject (bucket_name_, object_name);
111
- EXPECT_STATUS_OK (status);
113
+ EXPECT_THAT (status,
114
+ StatusIs (AnyOf (StatusCode::kOk , StatusCode::kNotFound )));
112
115
}
113
116
}
114
117
0 commit comments