Skip to content

Commit

Permalink
Bump test related plugin versions.
Browse files Browse the repository at this point in the history
  • Loading branch information
szetszwo committed Oct 7, 2024
1 parent b831226 commit 55a3896
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 13 deletions.
10 changes: 5 additions & 5 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@
<maven-checkstyle-plugin.version>3.3.0</maven-checkstyle-plugin.version>
<maven-clover2-plugin.version>4.0.6</maven-clover2-plugin.version>
<maven-pdf-plugin.version>1.6.1</maven-pdf-plugin.version>
<maven-surefire-plugin.version>3.0.0-M4</maven-surefire-plugin.version>
<maven-surefire-plugin.version>3.5.1</maven-surefire-plugin.version>
<wagon-ssh.version>3.5.3</wagon-ssh.version>
<hadoop-maven-plugins.version>3.4.0</hadoop-maven-plugins.version>

Expand Down Expand Up @@ -223,8 +223,8 @@
<testsThreadCount>4</testsThreadCount>

<slf4j.version>2.0.7</slf4j.version>
<junit.jupiter.version>5.10.1</junit.jupiter.version>
<jacoco.version>0.8.11</jacoco.version>
<junit-bom.version>5.11.2</junit-bom.version>
<jacoco.version>0.8.12</jacoco.version>
</properties>

<dependencyManagement>
Expand Down Expand Up @@ -427,7 +427,7 @@
<dependency>
<groupId>org.junit</groupId>
<artifactId>junit-bom</artifactId>
<version>${junit.jupiter.version}</version>
<version>${junit-bom.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
Expand Down Expand Up @@ -643,7 +643,7 @@
<enableProcessChecker>all</enableProcessChecker>
<forkedProcessTimeoutInSeconds>600</forkedProcessTimeoutInSeconds>
<!-- @argLine is filled by jacoco maven plugin. @{} means late evaluation -->
<argLine>-Xmx2048m -XX:+HeapDumpOnOutOfMemoryError @{argLine}</argLine>
<argLine>-Xmx8g -XX:+HeapDumpOnOutOfMemoryError @{argLine}</argLine>
<systemPropertyVariables>
<ratis.log.dir>${project.build.directory}/log</ratis.log.dir>
<ratis.tmp.dir>${project.build.directory}/tmp</ratis.tmp.dir>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ public synchronized boolean release() {
}

private static class AdvancedTracing<T> extends SimpleTracing<T> {
enum Op {CREATION, RETAIN, RELEASE}
enum Op {CREATION, RETAIN, RELEASE, LEAK}

static class Counts {
private final int refCount;
Expand Down Expand Up @@ -304,7 +304,6 @@ public String toString() {
}

private final List<TraceInfo> traceInfos = new ArrayList<>();
private int traceCount = 0;
private TraceInfo previous;

AdvancedTracing(T value, Runnable retainMethod, Consumer<Boolean> releaseMethod, LeakDetector leakDetector) {
Expand All @@ -313,7 +312,7 @@ public String toString() {
}

private synchronized TraceInfo addTraceInfo(Op op, int previousRefCount) {
final TraceInfo current = new TraceInfo(traceCount++, op, previous, previousRefCount);
final TraceInfo current = new TraceInfo(traceInfos.size(), op, previous, previousRefCount);
traceInfos.add(current);
previous = current;
return current;
Expand Down Expand Up @@ -342,13 +341,20 @@ public synchronized boolean release() {

@Override
synchronized String getTraceString(int count) {
return super.getTraceString(count) + formatTraceInfos(traceInfos);
return super.getTraceString(count) + formatTraceInfos();
}

private static String formatTraceInfos(List<TraceInfo> infos) {
final int n = infos.size();
private String formatTraceInfos() {
final int n = traceInfos.size();
final StringBuilder b = new StringBuilder(n << 10).append(" #TraceInfos=").append(n);
infos.forEach(info -> info.appendTo(b.append("\n")));
TraceInfo previous = null;
for (TraceInfo info : traceInfos) {
info.appendTo(b.append("\n"));
previous = info;
}
final TraceInfo last = new TraceInfo(n, Op.LEAK, previous, getCount());
last.appendTo(b.append("\n"));

return b.toString();
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ public String toString() {
@Test
@Timeout(value = 300)
public void testWithLoad() throws Exception {
runWithNewCluster(NUM_SERVERS, cluster -> testWithLoad(10, 300, false, cluster, LOG));
runWithNewCluster(NUM_SERVERS, cluster -> testWithLoad(5, 100, false, cluster, LOG));
}

static void testWithLoad(final int numClients, final int numMessages,
Expand Down

0 comments on commit 55a3896

Please sign in to comment.