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

Startup benchmarks: allow notifications #839

Merged
merged 1 commit into from
Jul 18, 2023

Conversation

martinbonnin
Copy link
Contributor

@martinbonnin martinbonnin commented Jul 16, 2023

Without this, trying to run the benchmarks fails with

 E  java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Object androidx.test.uiautomator.UiObject2.wait(androidx.test.uiautomator.UiObject2Condition, long)' on a null object reference
    	at com.google.samples.apps.nowinandroid.foryou.ForYouActionsKt.forYouWaitForContent(ForYouActions.kt:32)
    	at com.google.samples.apps.nowinandroid.startup.AbstractStartupBenchmark$startup$2.invoke(StartupBenchmark.kt:92)
    	at com.google.samples.apps.nowinandroid.startup.AbstractStartupBenchmark$startup$2.invoke(StartupBenchmark.kt:79)
    	at androidx.benchmark.macro.MacrobenchmarkKt$macrobenchmark$3$2.invoke(Macrobenchmark.kt:209)
    	at androidx.benchmark.macro.MacrobenchmarkKt$macrobenchmark$3$2.invoke(Macrobenchmark.kt:207)

I'm guessing because the permission popup hides the content below:

Now I'm wondering how much this popup biases the test in the first place cause we certainly don't want to measure the time to display the permission popup by the system?

Edit: I see there's some prior work here but unsure what the status is?

@tunjid tunjid self-requested a review July 18, 2023 16:01
@tunjid
Copy link
Contributor

tunjid commented Jul 18, 2023

Thanks for catching this!

@dturner dturner merged commit 0fcf104 into android:main Jul 18, 2023
4 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants