Merge "tests: Specify the death test style to avoid flakiness."
am: 878d5a77f0
Change-Id: Ia1cb4cea72323c80d605fdd9cedfa80d5e3145fb
This commit is contained in:
@@ -209,6 +209,7 @@ TEST(RangeSetTest, GetBlockNumber) {
|
|||||||
ASSERT_EQ(static_cast<size_t>(6), rs.GetBlockNumber(5));
|
ASSERT_EQ(static_cast<size_t>(6), rs.GetBlockNumber(5));
|
||||||
ASSERT_EQ(static_cast<size_t>(9), rs.GetBlockNumber(8));
|
ASSERT_EQ(static_cast<size_t>(9), rs.GetBlockNumber(8));
|
||||||
|
|
||||||
|
::testing::FLAGS_gtest_death_test_style = "threadsafe";
|
||||||
// Out of bound.
|
// Out of bound.
|
||||||
ASSERT_EXIT(rs.GetBlockNumber(9), ::testing::KilledBySignal(SIGABRT), "");
|
ASSERT_EXIT(rs.GetBlockNumber(9), ::testing::KilledBySignal(SIGABRT), "");
|
||||||
}
|
}
|
||||||
@@ -284,6 +285,8 @@ TEST(SortedRangeSetTest, file_range) {
|
|||||||
|
|
||||||
ASSERT_EQ(static_cast<size_t>(10), rs.GetOffsetInRangeSet(4106));
|
ASSERT_EQ(static_cast<size_t>(10), rs.GetOffsetInRangeSet(4106));
|
||||||
ASSERT_EQ(static_cast<size_t>(40970), rs.GetOffsetInRangeSet(4096 * 16 + 10));
|
ASSERT_EQ(static_cast<size_t>(40970), rs.GetOffsetInRangeSet(4096 * 16 + 10));
|
||||||
|
|
||||||
|
::testing::FLAGS_gtest_death_test_style = "threadsafe";
|
||||||
// block#10 not in range.
|
// block#10 not in range.
|
||||||
ASSERT_EXIT(rs.GetOffsetInRangeSet(40970), ::testing::KilledBySignal(SIGABRT), "");
|
ASSERT_EXIT(rs.GetOffsetInRangeSet(40970), ::testing::KilledBySignal(SIGABRT), "");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -408,5 +408,7 @@ TEST_F(ScreenRecoveryUITest, LoadAnimation_MissingAnimation) {
|
|||||||
ASSERT_TRUE(ui_->Init(kTestLocale));
|
ASSERT_TRUE(ui_->Init(kTestLocale));
|
||||||
TemporaryDir resource_dir;
|
TemporaryDir resource_dir;
|
||||||
Paths::Get().set_resource_dir(resource_dir.path);
|
Paths::Get().set_resource_dir(resource_dir.path);
|
||||||
|
|
||||||
|
::testing::FLAGS_gtest_death_test_style = "threadsafe";
|
||||||
ASSERT_EXIT(ui_->RunLoadAnimation(), ::testing::KilledBySignal(SIGABRT), "");
|
ASSERT_EXIT(ui_->RunLoadAnimation(), ::testing::KilledBySignal(SIGABRT), "");
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user