Commit a087f35b authored by Omer Katz's avatar Omer Katz Committed by Commit Bot

heap: Shorten concurrent marking tests

This is to address flaky timeouts of these tests.

Bug: 986235
Change-Id: I82658d97947ea1314290f9ffbd40b6529b80e04e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2134253Reviewed-by: default avatarAnton Bikineev <bikineev@chromium.org>
Commit-Queue: Omer Katz <omerkatz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#756253}
parent 9dce00d2
...@@ -38,7 +38,7 @@ class CollectionWrapper : public GarbageCollected<CollectionWrapper<T>> { ...@@ -38,7 +38,7 @@ class CollectionWrapper : public GarbageCollected<CollectionWrapper<T>> {
template <typename C> template <typename C>
void AddToCollection() { void AddToCollection() {
constexpr int kIterations = 100; constexpr int kIterations = 10;
IncrementalMarkingTestDriver driver(ThreadState::Current()); IncrementalMarkingTestDriver driver(ThreadState::Current());
Persistent<CollectionWrapper<C>> persistent = Persistent<CollectionWrapper<C>> persistent =
MakeGarbageCollected<CollectionWrapper<C>>(); MakeGarbageCollected<CollectionWrapper<C>>();
...@@ -57,7 +57,7 @@ void AddToCollection() { ...@@ -57,7 +57,7 @@ void AddToCollection() {
template <typename C, typename GetLocation> template <typename C, typename GetLocation>
void RemoveFromCollectionAtLocation(GetLocation location) { void RemoveFromCollectionAtLocation(GetLocation location) {
constexpr int kIterations = 100; constexpr int kIterations = 10;
IncrementalMarkingTestDriver driver(ThreadState::Current()); IncrementalMarkingTestDriver driver(ThreadState::Current());
Persistent<CollectionWrapper<C>> persistent = Persistent<CollectionWrapper<C>> persistent =
MakeGarbageCollected<CollectionWrapper<C>>(); MakeGarbageCollected<CollectionWrapper<C>>();
...@@ -309,7 +309,7 @@ TEST_F(ConcurrentMarkingTest, SwapHashCountedSet) { ...@@ -309,7 +309,7 @@ TEST_F(ConcurrentMarkingTest, SwapHashCountedSet) {
// Additional test for vectors and deques // Additional test for vectors and deques
template <typename V> template <typename V>
void PopFromCollection() { void PopFromCollection() {
constexpr int kIterations = 100; constexpr int kIterations = 10;
IncrementalMarkingTestDriver driver(ThreadState::Current()); IncrementalMarkingTestDriver driver(ThreadState::Current());
Persistent<CollectionWrapper<V>> persistent = Persistent<CollectionWrapper<V>> persistent =
MakeGarbageCollected<CollectionWrapper<V>>(); MakeGarbageCollected<CollectionWrapper<V>>();
...@@ -379,7 +379,7 @@ TEST_F(ConcurrentMarkingTest, PopFromVector) { ...@@ -379,7 +379,7 @@ TEST_F(ConcurrentMarkingTest, PopFromVector) {
// HeapVector with inlined buffer // HeapVector with inlined buffer
template <typename T> template <typename T>
class HeapInlinedVectorAdapter : public HeapVectorAdapter<T, 100> {}; class HeapInlinedVectorAdapter : public HeapVectorAdapter<T, 10> {};
TEST_F(ConcurrentMarkingTest, AddToInlinedVector) { TEST_F(ConcurrentMarkingTest, AddToInlinedVector) {
AddToCollection<HeapInlinedVectorAdapter<Member<IntegerObject>>>(); AddToCollection<HeapInlinedVectorAdapter<Member<IntegerObject>>>();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment