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

ProgressBar AssertionError, if content-length not set #130

Open
moritzLanger opened this issue Nov 7, 2023 · 1 comment · May be fixed by #286
Open

ProgressBar AssertionError, if content-length not set #130

moritzLanger opened this issue Nov 7, 2023 · 1 comment · May be fixed by #286
Assignees
Labels
bug Something isn't working

Comments

@moritzLanger
Copy link
Contributor

Expected behavior

If a download does not provide a content length it should still be downloaded using the workaround show here.

Actual behavior

An assertion error will be thrown if the content length is not set and/or provided with the download. This error is throw in the IdeProgressBarTestImpl as it asserts that the total of the progress bar equals its max before closing, as can be seen here.

Steps to reproduce (bug) / Use Case of feature request (enhancement)

  1. Mock a server, which contains/downloads a File without specifing the Content length in the header
  2. Run the InstallCommandlet with the URL from the mocked server.

Affected version:

  • OS: Windows
  • OS : probably Linux/Mac aswell
@moritzLanger moritzLanger added the bug Something isn't working label Nov 7, 2023
@hohwille
Copy link
Member

Consider adding a method to complete the progressbar to our own API that can complete the progressbar (setting actual to max). Or as alternative create a dummy implementation that does not use the real progressbar if no content-length is available. If possible still give feedback to user of progress (x MB / ?).

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