Skip to content

tests not working offline #1475

@hohwille

Description

@hohwille

Actual behavior

Our tests were broken by offline checks made recently.

ERROR:You are offline and cannot download from URL http://localhost:59224/mockedPlugin

And later

[ERROR] com.devonfw.tools.ide.tool.androidstudio.AndroidStudioTest.testAndroidStudioRun(String, WireMockRuntimeInfo)[2] -- Time elapsed: 0.245 s <<< FAILURE!
java.lang.AssertionError:

The first entry that was not matching from a block of 2 expected log-entries was:
SUCCESS:Successfully ended step 'Install plugin MockedPlugin'.

Reproduce

  1. get offline
  2. mvn test

Expected behavior

We are using wiremock to make our tests independent of external resources (Internet).
So the current behaviour does not make sense IMHO.
I was always trying to tell that we should first do network access and if that fails do the online check to improve how the exception we received can be enhanced for the end-user. But making an online check before network access is not smart because it causes extra network overhead and delay plus it leads to this pointless error.

To be clear and precise: When the user provides the offline flag --offline this is different. For consistency it makes sense that then all downloads and network access gets rejected.

IDEasy status

$ ide -p status
Updates are available for the settings repository. If you want to apply the latest changes, call "ide update"
IDE_ROOT is set to D:/projects
IDE_HOME is set to D:/projects/project
You are offline. Check your internet connection and potential proxy settings.
Your settings are not up-to-date, please run 'ide update'.
Your version of IDEasy is 2025.08.001.
Skipping check for newer version of IDEasy because you are offline.
Your operating system is windows(10.0)@x64 [Windows 11@amd64]
Successfully completed ide (status)

Related/Dependent issues

Comments/Hints

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    internalNothing to be added to CHANGELOG, only internal storytestrelated to testing and QA

    Type

    Projects

    Status

    ✅ Done

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions