Skip to content

Commit

Permalink
Small fix in jvmStats test
Browse files Browse the repository at this point in the history
Removing second use of the `frequentyl()` function. This function is alraedy used in the
beginning of the testing block immediately after the declaration of `jvmStats` variable.
The second use of the `frequently()` could cause all the other variables that were carefully
prepared for the constructor to not be used at all.

Signed-off-by: Lukáš Vlček <lukas.vlcek@aiven.io>
  • Loading branch information
lukas-vlcek committed Jun 7, 2024
1 parent cfaa196 commit f5bf84b
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -682,8 +682,7 @@ public static NodeStats createNodeStats(boolean remoteStoreStats) throws IOExcep
);
}
JvmStats.Classes classes = new JvmStats.Classes(randomNonNegativeLong(), randomNonNegativeLong(), randomNonNegativeLong());
jvmStats = frequently()
? new JvmStats(
jvmStats = new JvmStats(
randomNonNegativeLong(),
randomNonNegativeLong(),
new JvmStats.Mem(
Expand All @@ -698,8 +697,7 @@ public static NodeStats createNodeStats(boolean remoteStoreStats) throws IOExcep
garbageCollectors,
randomBoolean() ? Collections.emptyList() : bufferPoolList,
classes
)
: null;
);
}
ThreadPoolStats threadPoolStats = null;
if (frequently()) {
Expand Down

0 comments on commit f5bf84b

Please sign in to comment.