Skip to content

Commit

Permalink
[TH2-5226] Corrected after review
Browse files Browse the repository at this point in the history
  • Loading branch information
Nikita-Smirnov-Exactpro committed Sep 19, 2024
1 parent 0535798 commit cfa249f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: "Run integration tests for LDP"
name: "Run integration tests for infra-operator"

on:
push:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,9 @@
import org.slf4j.LoggerFactory;

import java.io.IOException;
import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReentrantLock;

public class PrometheusServer implements AutoCloseable {
private static final Logger LOGGER = LoggerFactory.getLogger(PrometheusServer.class);
private final Lock lock = new ReentrantLock();
@Nullable
private final HTTPServer server;

Expand All @@ -50,13 +47,8 @@ public PrometheusServer(PrometheusConfiguration<String> configuration) throws IO

@Override
public void close() {
lock.lock();
try {
if (server != null) {
server.close();
}
} finally {
lock.unlock();
if (server != null) {
server.close();
}
}
}

0 comments on commit cfa249f

Please sign in to comment.