diff --git a/presto-spi/src/main/java/io/prestosql/spi/service/PropertyService.java b/presto-spi/src/main/java/io/prestosql/spi/service/PropertyService.java index 81113b304..39704b169 100644 --- a/presto-spi/src/main/java/io/prestosql/spi/service/PropertyService.java +++ b/presto-spi/src/main/java/io/prestosql/spi/service/PropertyService.java @@ -17,10 +17,10 @@ import io.airlift.units.Duration; import java.util.ArrayList; import java.util.Arrays; -import java.util.HashMap; import java.util.List; import java.util.Locale; import java.util.Map; +import java.util.concurrent.ConcurrentHashMap; import static java.util.Objects.requireNonNull; @@ -34,7 +34,7 @@ public class PropertyService { } - private static Map properties = new HashMap<>(); + private static Map properties = new ConcurrentHashMap(); /** * Return the value of the property from key, converted to String diff --git a/presto-tests/src/test/java/io/prestosql/memory/TestMemoryManager.java b/presto-tests/src/test/java/io/prestosql/memory/TestMemoryManager.java index 40fb3d6fa..7b0e13077 100644 --- a/presto-tests/src/test/java/io/prestosql/memory/TestMemoryManager.java +++ b/presto-tests/src/test/java/io/prestosql/memory/TestMemoryManager.java @@ -342,7 +342,7 @@ public class TestMemoryManager return stats.isFullyBlocked() || stats.getRunningDrivers() == 0; } - @Test(timeOut = 60_000, expectedExceptions = RuntimeException.class, expectedExceptionsMessageRegExp = ".*Query exceeded distributed user memory limit of 1kB.*") + @Test(timeOut = 180_000, expectedExceptions = RuntimeException.class, expectedExceptionsMessageRegExp = ".*Query exceeded distributed user memory limit of 1kB.*") public void testQueryUserMemoryLimit() throws Exception { @@ -369,7 +369,7 @@ public class TestMemoryManager } } - @Test(timeOut = 60_000, expectedExceptions = RuntimeException.class, expectedExceptionsMessageRegExp = ".*Query exceeded per-node user memory limit of 1kB.*") + @Test(timeOut = 180_000, expectedExceptions = RuntimeException.class, expectedExceptionsMessageRegExp = ".*Query exceeded per-node user memory limit of 1kB.*") public void testQueryMemoryPerNodeLimit() throws Exception {