Skip to content

Commit

Permalink
etcd: update to v3.5.9
Browse files Browse the repository at this point in the history
Signed-off-by: Luca Burgazzoli <lburgazzoli@gmail.com>
  • Loading branch information
lburgazzoli committed May 28, 2023
1 parent 7374906 commit d7149d1
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
import org.testcontainers.containers.Network;

public final class Etcd {
public static final String CONTAINER_IMAGE = "gcr.io/etcd-development/etcd:v3.5.4";
public static final String CONTAINER_IMAGE = "gcr.io/etcd-development/etcd:v3.5.9";
public static final int ETCD_CLIENT_PORT = 2379;
public static final int ETCD_PEER_PORT = 2380;
public static final String ETCD_DATA_DIR = "/data.etcd";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -188,11 +188,15 @@ private String[] createCommand() {

private static void deleteDataDirectory(Path dir) {
if (dir != null && Files.exists(dir)) {
try (Stream<Path> stream = Files.walk(dir)) {
stream.sorted(Comparator.reverseOrder())
.map(Path::toFile)
.forEach(File::delete);
} catch (IOException e) {
try {
try (Stream<Path> stream = Files.walk(dir)) {
stream.sorted(Comparator.reverseOrder())
.map(Path::toFile)
.forEach(File::delete);
} catch (IOException e) {
LOGGER.error("Error deleting directory {}", dir, e);
}
} catch (Exception e) {
LOGGER.error("Error deleting directory {}", dir, e);
}
}
Expand Down

0 comments on commit d7149d1

Please sign in to comment.