wordpress-mobile / wordpress-mobile/WordPress-Android

Tests sometimes fail with AppLogWrapper conflicts

Open
#18,886 0 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

[Type] Bug Tech Debt Testing
Dominant language
Kotlin
Stars
3.2k
Forks
1.4k
Avg merge
1d 11h
Merged PRs (30d)
69

Description

Expected behavior

Tests should not fail (or if they have errors unrelated with AppLogWrapper, those errors should be reported instead).

Actual behavior

Occasionally, the tests will fail to build with the following error:

Cannot access class 'org.wordpress.android.fluxc.utils.AppLogWrapper'. Check your module classpath for missing or conflicting dependencies
Steps to reproduce the behavior

It is not clear if this will reliably reproduce the issue, but it has been observed following these steps:

  1. Introduce a compile error in a test file
  2. Try to build / run the test implementation
  3. 💥 The above error is reported instead

Note: in case this occurs, even after fixing the underlying error, the above error will still be reported until a clean / build is performed.

Until this is properly resolved, the work-around for now is to clean and rebuilt after resolving the other errors.

To properly fix this, it is probably best to resolve the circular dependencies between WordPress-Android and WordPress-FluxC-Android (specifically in the test implementation, and regarding our usages of AppLog and AppLogWrapper classes).

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by examining the WordPress-Android and WordPress-FluxC-Android test implementation and their usages of AppLog and AppLogWrapper. Reproduce the failure by introducing a test compile error, then clean and rebuild; done means the underlying test error is reported without the AppLogWrapper classpath conflict.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, kotlin
Domain
build-system, mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.