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

Flank does not handle @SdkSuppress annotation correctly #2053

Closed
pawelpasterz opened this issue Jun 30, 2021 · 4 comments · Fixed by #2094
Closed

Flank does not handle @SdkSuppress annotation correctly #2053

pawelpasterz opened this issue Jun 30, 2021 · 4 comments · Fixed by #2094

Comments

@pawelpasterz
Copy link
Contributor

Describe the bug

A clear and concise description of what the bug is.

copy-pasted from the original issue #818 (comment)

We're seeing this issue as well, usually because we have @SdkSuppress on on a test which happens to be the only test on the shard.

Although in our case, FTL doesn't detect that there were no tests in the shard - instead, it reports a single test with the name null as seen here:

image
image

java.lang.ClassNotFoundException: Invalid name: no tests found
at java.lang.Class.classForName(Native Method)
at java.lang.Class.forName(Class.java:400)
at androidx.test.internal.runner.TestLoader.doCreateRunner(TestLoader.java:72)
at androidx.test.internal.runner.TestLoader.getRunnersFor(TestLoader.java:105)
at androidx.test.internal.runner.TestRequestBuilder.build(TestRequestBuilder.java:804)
at androidx.test.runner.AndroidJUnitRunner.buildRequest(AndroidJUnitRunner.java:575)
at androidx.test.runner.AndroidJUnitRunner.onStart(AndroidJUnitRunner.java:393)
at android.app.Instrumentation$InstrumentationThread.run(Instrumentation.java:1932)

We also don't see the message that you mentioned in the output, "One or more shards failed because there are no test cases inside." The table in the output just says that "N tests failed".

@bootstraponline Would this be considered the same issue, or should I file a different one? Or is this something that needs to be looked into on the FTL side? (Or even ATO?) Is this something that can be solved in Flank?

Expected behavior

A clear and concise description of what you expected to happen.

Flank should skip tests when sdk version requirement is not fulfilled
Once fixed -- update IT with new case

@bootstraponline
Copy link
Contributor

@damianw hey, we discussed this issue in sprint planning today. The team will be working on this.

@damianw
Copy link

damianw commented Jul 2, 2021

Thanks for the update! Looking forward to it.

@pawelpasterz pawelpasterz self-assigned this Jul 5, 2021
@zuziaka zuziaka added the BV label Jul 5, 2021
@mergify mergify bot closed this as completed in #2094 Jul 23, 2021
mergify bot pushed a commit that referenced this issue Jul 23, 2021
Fixes #2053

## Test Plan
> How do we know the code works?

1. Run Flank with `SdkSuppress` methods (ex. use `test_projects/android/app_sdksuppress`) project
2. Play with different API versions(using YAML `device`->`version` and check if flank has any problems)

## Checklist

- [x] Unit tested
- [x] Tests project added
@piotradamczyk5
Copy link
Contributor

@damianw could you test with Flank v21.07.2 and let us know about the results?

@damianw
Copy link

damianw commented Jul 23, 2021

Will do, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants