summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--it/jvpp-benchmark/src/main/java/io/fd/hc2vpp/it/jvpp/benchmark/acl/AclUpdateBenchmark.java3
-rw-r--r--it/jvpp-benchmark/src/main/java/io/fd/hc2vpp/it/jvpp/benchmark/classify/ClassifyTableBenchmark.java3
2 files changed, 6 insertions, 0 deletions
diff --git a/it/jvpp-benchmark/src/main/java/io/fd/hc2vpp/it/jvpp/benchmark/acl/AclUpdateBenchmark.java b/it/jvpp-benchmark/src/main/java/io/fd/hc2vpp/it/jvpp/benchmark/acl/AclUpdateBenchmark.java
index ac3032ccd..b1f598253 100644
--- a/it/jvpp-benchmark/src/main/java/io/fd/hc2vpp/it/jvpp/benchmark/acl/AclUpdateBenchmark.java
+++ b/it/jvpp-benchmark/src/main/java/io/fd/hc2vpp/it/jvpp/benchmark/acl/AclUpdateBenchmark.java
@@ -134,6 +134,9 @@ public class AclUpdateBenchmark extends JVppBenchmark {
return aclId;
}
+ // Sonar reports unclosed resources, but jvpp connections are closed in JVppBenchmark.tearDown.
+ // It is only a benchmark, so if JMH would crash and not call tearDown, then we don't really care.
+ @SuppressWarnings("squid:S2095")
@Override
protected void connect(final JVppRegistry registry) throws IOException {
jvppCore = new FutureJVppCoreFacade(registry, new JVppCoreImpl());
diff --git a/it/jvpp-benchmark/src/main/java/io/fd/hc2vpp/it/jvpp/benchmark/classify/ClassifyTableBenchmark.java b/it/jvpp-benchmark/src/main/java/io/fd/hc2vpp/it/jvpp/benchmark/classify/ClassifyTableBenchmark.java
index fba7110d1..c37fa0765 100644
--- a/it/jvpp-benchmark/src/main/java/io/fd/hc2vpp/it/jvpp/benchmark/classify/ClassifyTableBenchmark.java
+++ b/it/jvpp-benchmark/src/main/java/io/fd/hc2vpp/it/jvpp/benchmark/classify/ClassifyTableBenchmark.java
@@ -48,6 +48,9 @@ public class ClassifyTableBenchmark extends JVppBenchmark {
classifyTableProvider = new ClassifyTableProviderImpl(tableSetSize);
}
+ // Sonar reports unclosed resources, but jvpp connection is closed in JVppBenchmark.tearDown.
+ // It is only a benchmark, so if JMH would crash and not call tearDown, then we don't really care.
+ @SuppressWarnings("squid:S2095")
@Override
protected void connect(final JVppRegistry registry) throws IOException {
jvppCore = new FutureJVppCoreFacade(registry, new JVppCoreImpl());