diff options
author | Marek Gradzki <mgradzki@cisco.com> | 2018-08-13 07:12:38 +0200 |
---|---|---|
committer | Marek Gradzki <mgradzki@cisco.com> | 2018-08-13 05:14:03 +0000 |
commit | 7d7c3e18976d22bd2dd81fa33d4fc5bd81cca43c (patch) | |
tree | 676fb8cdc49221fe8f6f8b450bf16ba3894f29a0 /it | |
parent | ced987e54e5cf45f518143a18245b1430c0bc470 (diff) |
jvpp-benchmark: ignore unclosed resources reported by Sonar
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.
Change-Id: I60ae60c78610b8c07076c7d2a94917e8316d03dd
Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
Diffstat (limited to 'it')
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()); |