Skip to content

Commit

Permalink
Address review comment
Browse files Browse the repository at this point in the history
  • Loading branch information
saraadams committed Nov 27, 2023
1 parent 8d34bab commit 09032f9
Showing 1 changed file with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public void doesNotCreateSuggestionsIfActionStatsIsEmpty()
.thenReturn(new TotalDuration(Duration.ofSeconds(100)));

final var bottleneckSuggestionProvider =
new BottleneckSuggestionProvider(1, 1, Duration.ZERO, 0, 1.);
new BottleneckSuggestionProvider(1, 1, Duration.ZERO, 0, 1);
final var suggestions = bottleneckSuggestionProvider.getSuggestions(dataManager);
assertThat(suggestions.getSuggestionList()).isEmpty();
assertThat(suggestions.hasFailure()).isFalse();
Expand All @@ -73,7 +73,7 @@ public void doesNotCreateSuggestionsIfEstimatedCoresUsedIsEmpty()
.thenReturn(new TotalDuration(Duration.ofSeconds(100)));

final var bottleneckSuggestionProvider =
new BottleneckSuggestionProvider(1, 1, Duration.ZERO, 0, 1.);
new BottleneckSuggestionProvider(1, 1, Duration.ZERO, 0, 1);
final var suggestions = bottleneckSuggestionProvider.getSuggestions(dataManager);
assertThat(suggestions.getSuggestionList()).isEmpty();
assertThat(suggestions.hasFailure()).isFalse();
Expand All @@ -91,7 +91,7 @@ public void doesNotCreateSuggestionsIfTotalDurationIsEmpty()
when(dataManager.getDatum(TotalDuration.class)).thenReturn(new TotalDuration("empty"));

final var bottleneckSuggestionProvider =
new BottleneckSuggestionProvider(1, 1, Duration.ZERO, 0, 1.);
new BottleneckSuggestionProvider(1, 1, Duration.ZERO, 0, 1);
final var suggestions = bottleneckSuggestionProvider.getSuggestions(dataManager);
assertThat(suggestions.getSuggestionList()).isEmpty();
assertThat(suggestions.hasFailure()).isFalse();
Expand All @@ -110,7 +110,7 @@ public void doesNotCreateSuggestionsIfThereAreNoBottlenecks()
when(dataManager.getDatum(ActionStats.class)).thenReturn(new ActionStats(List.of()));

final var bottleneckSuggestionProvider =
new BottleneckSuggestionProvider(1, 1, Duration.ZERO, 0, 1.);
new BottleneckSuggestionProvider(1, 1, Duration.ZERO, 0, 1);
final var suggestions = bottleneckSuggestionProvider.getSuggestions(dataManager);
assertThat(suggestions.getSuggestionList()).isEmpty();
assertThat(suggestions.hasFailure()).isFalse();
Expand All @@ -133,7 +133,7 @@ public void doesNotCreateSuggestionsIfBottlenecksAreShorterThanMinDuration()
when(dataManager.getDatum(ActionStats.class)).thenReturn(new ActionStats(List.of(bottleneck)));

final var bottleneckSuggestionProvider =
new BottleneckSuggestionProvider(1, 1, minDuration, 0, 1.);
new BottleneckSuggestionProvider(1, 1, minDuration, 0, 1);
final var suggestions = bottleneckSuggestionProvider.getSuggestions(dataManager);
assertThat(suggestions.getSuggestionList()).isEmpty();
assertThat(suggestions.hasFailure()).isFalse();
Expand All @@ -155,7 +155,7 @@ public void createSuggestionIfThereAreBottlenecks()
when(dataManager.getDatum(ActionStats.class)).thenReturn(new ActionStats(List.of(bottleneck)));

final var bottleneckSuggestionProvider =
new BottleneckSuggestionProvider(1, 1, Duration.ZERO, 0, 1.);
new BottleneckSuggestionProvider(1, 1, Duration.ZERO, 0, 1);
final var suggestions = bottleneckSuggestionProvider.getSuggestions(dataManager);
assertThat(suggestions.getSuggestionList()).hasSize(1);
assertThat(suggestions.hasFailure()).isFalse();
Expand All @@ -178,7 +178,7 @@ public void createsQueuingSuggestionIfThereIsQueuing()
when(dataManager.getDatum(ActionStats.class)).thenReturn(new ActionStats(List.of(bottleneck)));

final var bottleneckSuggestionProvider =
new BottleneckSuggestionProvider(1, 1, Duration.ZERO, 0, 1.);
new BottleneckSuggestionProvider(1, 1, Duration.ZERO, 0, 1);
final var suggestions = bottleneckSuggestionProvider.getSuggestions(dataManager);
assertThat(suggestions.getSuggestionList()).hasSize(1);
assertThat(suggestions.getSuggestion(0).getId())
Expand All @@ -203,7 +203,7 @@ public void createsBreakDownActionsSuggestionOnLittleQueuing()
when(dataManager.getDatum(ActionStats.class)).thenReturn(new ActionStats(List.of(bottleneck)));

final var bottleneckSuggestionProvider =
new BottleneckSuggestionProvider(1, 1, Duration.ZERO, 0, 1.);
new BottleneckSuggestionProvider(1, 1, Duration.ZERO, 0, 1);
final var suggestions = bottleneckSuggestionProvider.getSuggestions(dataManager);
assertThat(suggestions.getSuggestionList()).hasSize(1);
assertThat(suggestions.getSuggestion(0).getId())
Expand All @@ -227,7 +227,7 @@ public void doesNotAddSuggestionIfBelowMinImprovementRatio()
when(dataManager.getDatum(ActionStats.class)).thenReturn(new ActionStats(List.of(bottleneck)));

final var bottleneckSuggestionProvider =
new BottleneckSuggestionProvider(1, 1, Duration.ZERO, 100, 1.);
new BottleneckSuggestionProvider(1, 1, Duration.ZERO, 100, 1);
final var suggestions = bottleneckSuggestionProvider.getSuggestions(dataManager);
assertThat(suggestions.getSuggestionList()).isEmpty();
assertThat(suggestions.hasFailure()).isFalse();
Expand Down Expand Up @@ -280,7 +280,7 @@ public void createsOnlyLimitedSuggestions()
.thenReturn(new ActionStats(List.of(minorBottleneck, majorBottleneck)));

final var bottleneckSuggestionProvider =
new BottleneckSuggestionProvider(1, 1, Duration.ZERO, 0, 1.);
new BottleneckSuggestionProvider(1, 1, Duration.ZERO, 0, 1);
final var suggestions = bottleneckSuggestionProvider.getSuggestions(dataManager);
assertThat(suggestions.getSuggestionCount()).isEqualTo(1);
assertThat(suggestions.getSuggestion(0).getRationaleCount()).isEqualTo(1);
Expand All @@ -304,7 +304,7 @@ public void doNotAddCaveatIfTargetNamesAreNotIncludedAndThereAreNoBottlenecks()
when(dataManager.getDatum(ActionStats.class)).thenReturn(new ActionStats(List.of()));

final var bottleneckSuggestionProvider =
new BottleneckSuggestionProvider(1, 1, Duration.ZERO, 0, 1.);
new BottleneckSuggestionProvider(1, 1, Duration.ZERO, 0, 1);
final var suggestions = bottleneckSuggestionProvider.getSuggestions(dataManager);
assertThat(suggestions.getSuggestionList()).isEmpty();
assertThat(suggestions.getCaveatList()).isEmpty();
Expand All @@ -329,7 +329,7 @@ public void addCaveatIfTargetNamesAreNotIncluded()
when(dataManager.getDatum(ActionStats.class)).thenReturn(new ActionStats(List.of(bottleneck)));

final var bottleneckSuggestionProvider =
new BottleneckSuggestionProvider(1, 1, Duration.ZERO, 0, 1.);
new BottleneckSuggestionProvider(1, 1, Duration.ZERO, 0, 1);
final var suggestions = bottleneckSuggestionProvider.getSuggestions(dataManager);
assertThat(suggestions.getSuggestionList()).hasSize(1);
assertThat(suggestions.getCaveatList()).hasSize(1);
Expand Down

0 comments on commit 09032f9

Please sign in to comment.