Skip to content

Commit

Permalink
fixed test
Browse files Browse the repository at this point in the history
  • Loading branch information
hohwille committed Dec 6, 2024
1 parent 11cda38 commit 81e6f9b
Showing 1 changed file with 2 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,19 +68,14 @@ public void testProgressBarDownloadWithMissingContentLength(@TempDir Path tempDi

//assert
assertUnknownProgressBar(context, "Downloading", MAX_LENGTH);
checkLogMessageForMissingContentLength(context, testUrl);
assertThat(context).logAtWarning().hasMessage(
"Content-Length was not provided by download from " + testUrl);
assertThat(tempDir.resolve("windows_x64_url.tgz")).exists();
IdeProgressBarTestImpl progressBar = context.getProgressBarMap().get(taskName);

assertThat(progressBar.getMaxSize()).isEqualTo(-1);
}

private void checkLogMessageForMissingContentLength(IdeTestContext context, String source) {

assertThat(context).logAtWarning().hasMessage(
"Content-Length was not provided by download/copy source: " + source + ".");
}

/**
* Tests if {@link FileAccess#download(String, Path)} copy process with known file size is working properly.
*
Expand Down

0 comments on commit 81e6f9b

Please sign in to comment.