Skip to content

Commit

Permalink
[CameraPipe] Update CapturePipelineTest to use TestScope instead of r…
Browse files Browse the repository at this point in the history
…eal time work

  The test is very slow for a unit test and takes around 3.5 mins due to using real time delays and awaitings. Instead, TestScope can be used which tracks virtual time making the tests significantly faster (20s) comparatively.

Bug: 284492140
Bug: 286173948
Test: CapturePipelineTest
Change-Id: Ic1a974af6e2cf56f319c484edb9cf68c97e18ed8
  • Loading branch information
Zeronfinity committed Jun 8, 2023
1 parent 61e3b9a commit 8c23de1
Show file tree
Hide file tree
Showing 2 changed files with 134 additions and 105 deletions.
1 change: 1 addition & 0 deletions camera/camera-camera2-pipe-integration/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ dependencies {
testImplementation(libs.mockitoKotlin4)
testImplementation(libs.robolectric)
testImplementation(libs.kotlinCoroutinesTest)
testImplementation(libs.kotlinTestJunit)
testImplementation(project(":camera:camera-camera2-pipe-testing"))
testImplementation(project(":camera:camera-testing"))
testImplementation(project(":internal-testutils-ktx"))
Expand Down
Loading

0 comments on commit 8c23de1

Please sign in to comment.