Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Start a thrash test suite for the collection node #1246

Merged
merged 12 commits into from
Jan 3, 2019
Prev Previous commit
Next Next commit
Reset the thrash count
  • Loading branch information
mikezucc committed Nov 20, 2018
commit a99f028b274c6616983e2156e43456c3f856fa80
13 changes: 7 additions & 6 deletions Tests/ASCollectionViewThrashTests.mm
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
//
// ASCollectionViewThrashTests.m
// AsyncDisplayKitTests
// ASTableViewThrashTests.mm
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// ASTableViewThrashTests.mm
// ASCollectionViewThrashTests.mm

// Texture
//
// Created by Michael Zuccarino on 11/15/18.
// Copyright © 2018 Pinterest. All rights reserved.
// Copyright (c) Facebook, Inc. and its affiliates. All rights reserved.
// Changes after 4/13/2017 are: Copyright (c) Pinterest, Inc. All rights reserved.
// Licensed under Apache 2.0: http://www.apache.org/licenses/LICENSE-2.0
//

#import <XCTest/XCTest.h>
Expand Down Expand Up @@ -125,7 +126,7 @@ - (void)testThrashingWildlyDispatchWildly {
[self tearDown];
}

[self waitForExpectationsWithTimeout:60 handler:nil];
[self waitForExpectationsWithTimeout:100 handler:nil];
}

#pragma mark Helpers
Expand Down Expand Up @@ -176,7 +177,7 @@ - (void)applyUpdateUsingBatchUpdates:(ASThrashUpdate *)update
}

if (wait) {
[self waitForExpectationsWithTimeout:5 handler:nil];
[self waitForExpectationsWithTimeout:1 handler:nil];
}
}

Expand Down
7 changes: 4 additions & 3 deletions Tests/ASThrashUtility.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
//
// ASThrashUtility.h
// ASTableViewThrashTests.mm
mikezucc marked this conversation as resolved.
Show resolved Hide resolved
// Texture
//
// Copyright (c) Pinterest, Inc. All rights reserved.
// Copyright (c) Facebook, Inc. and its affiliates. All rights reserved.
// Changes after 4/13/2017 are: Copyright (c) Pinterest, Inc. All rights reserved.
// Licensed under Apache 2.0: http://www.apache.org/licenses/LICENSE-2.0
//

Expand All @@ -16,7 +17,7 @@ NS_ASSUME_NONNULL_BEGIN
#define kMinimumItemCount 5
#define kMinimumSectionCount 3
#define kFickleness 0.1
#define kThrashingIterationCount 2
#define kThrashingIterationCount 100

// Set to 1 to use UITableView and see if the issue still exists.
#define USE_UIKIT_REFERENCE 0
Expand Down
5 changes: 3 additions & 2 deletions Tests/ASThrashUtility.m
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
//
// ASThrashUtility.m
// ASTableViewThrashTests.mm
// Texture
//
// Copyright (c) Pinterest, Inc. All rights reserved.
// Copyright (c) Facebook, Inc. and its affiliates. All rights reserved.
// Changes after 4/13/2017 are: Copyright (c) Pinterest, Inc. All rights reserved.
// Licensed under Apache 2.0: http://www.apache.org/licenses/LICENSE-2.0
//

Expand Down