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

Android Unit test with Engine per test fails #2155

Closed
yschimke opened this issue Apr 10, 2022 · 2 comments
Closed

Android Unit test with Engine per test fails #2155

yschimke opened this issue Apr 10, 2022 · 2 comments

Comments

@yschimke
Copy link
Contributor

Same test but fails if Engine is single use.

Error is 2: no_healthy_upstream

    private lateinit var engine: Engine

    @BeforeEach
    // @JvmStatic
    fun setup() {
      val application = ApplicationProvider.getApplicationContext<Application>()

      engine = AndroidEngineBuilder(application, baseConfiguration = Standard())
        .addLogLevel(LogLevel.INFO)
        .setLogger { println(it) }
        .build()
    }

    @AfterEach
    // @JvmStatic
    fun teardown() {
      engine.terminate()
    }

I'll change to using a single engine, but flagging. Is there something else apart from engine.terminate I should do?

@yschimke
Copy link
Contributor Author

My test is here square/okhttp#7231

@yschimke
Copy link
Contributor Author

Dupe of #332

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

No branches or pull requests

1 participant