Skip to content

Commit

Permalink
5.11.0 || Fix unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
pbortnik committed Mar 1, 2024
1 parent 6f65e2d commit 0c426d5
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ plugins {
import org.owasp.dependencycheck.reporting.ReportGenerator

apply from: 'project-properties.gradle'
apply from: "$scriptsUrl/build-docker.gradle"
//apply from: "$scriptsUrl/build-docker.gradle"
apply from: "$scriptsUrl/build-commons.gradle"
apply from: "$scriptsUrl/build-info.gradle"
apply from: "$scriptsUrl/release-service.gradle"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ private Long indexPartition(List<Long> itemIds, AnalyzerConfig analyzerConfig, L
private Long countLogs(List<IndexLaunch> indexLaunch) {
return indexLaunch.stream()
.flatMap(launch -> launch.getTestItems().stream())
.mapToLong(item -> item.getLogs().size())
.mapToLong(item -> item.getLogs() != null ? item.getLogs().size() : 0)
.sum();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import java.nio.file.Path;
import java.time.Instant;
import java.util.Date;
import java.util.HashSet;
import java.util.Optional;
import java.util.Set;
import javax.inject.Provider;
Expand Down Expand Up @@ -106,7 +107,12 @@ void whenImportLaunch_thenProcessXmlFile(@TempDir Path tempDir) throws Exception
void whenImportLaunch_andIsSkippedIssue_thenProcessXmlFileWithSkippedTrue(@TempDir Path tempDir)
throws Exception {
LaunchImportRQ rq = new LaunchImportRQ();
rq.setAttributes(Set.of(new ItemAttributesRQ(AbstractImportStrategy.SKIPPED_IS_NOT_ISSUE, "true")));
ItemAttributesRQ attributesRQ =
new ItemAttributesRQ(AbstractImportStrategy.SKIPPED_IS_NOT_ISSUE, "true");
attributesRQ.setSystem(true);
Set<ItemAttributesRQ> attributes = new HashSet<>();
attributes.add(attributesRQ);
rq.setAttributes(attributes);

File xmlFile = createFile(tempDir);

Expand Down

0 comments on commit 0c426d5

Please sign in to comment.