diff --git a/eo-runtime/src/main/java/org/eolang/PhTraced.java b/eo-runtime/src/main/java/org/eolang/PhTraced.java index db9b5725ee..5f906510d3 100644 --- a/eo-runtime/src/main/java/org/eolang/PhTraced.java +++ b/eo-runtime/src/main/java/org/eolang/PhTraced.java @@ -41,7 +41,7 @@ public final class PhTraced implements Phi { /** * Name of property that responsible for keeping max depth. */ - public static final String RECURSION_THRESHOLD = "EO_MAX_CAGE_RECURSION_DEPTH"; + public static final String RECURSION_LIMIT = "EO_MAX_CAGE_RECURSION_DEPTH"; /** * Cages that are currently being dataized. If one cage is being datazed, and @@ -75,7 +75,7 @@ public PhTraced(final Phi object, final Integer locator) { object, locator, Integer.parseInt( - System.getProperty(PhTraced.RECURSION_THRESHOLD, "100") + System.getProperty(PhTraced.RECURSION_LIMIT, "100") ) ); } diff --git a/eo-runtime/src/test/java/EOorg/EOeolang/EOcageTest.java b/eo-runtime/src/test/java/EOorg/EOeolang/EOcageTest.java index d3ec0067fe..e8d8ac4ae6 100644 --- a/eo-runtime/src/test/java/EOorg/EOeolang/EOcageTest.java +++ b/eo-runtime/src/test/java/EOorg/EOeolang/EOcageTest.java @@ -212,13 +212,13 @@ class RecursionTests { @BeforeEach void setDepth() { System.setProperty( - PhTraced.RECURSION_THRESHOLD, String.valueOf(MAX_DEPTH) + PhTraced.RECURSION_LIMIT, String.valueOf(MAX_DEPTH) ); } @AfterEach void clearDepth() { - System.clearProperty(PhTraced.RECURSION_THRESHOLD); + System.clearProperty(PhTraced.RECURSION_LIMIT); } @Test @@ -257,7 +257,7 @@ void doesNotThrowIfDataizesConcurrently() { @Test void rewritesItselfToItselfViaDummy() { System.setProperty( - PhTraced.RECURSION_THRESHOLD, "2" + PhTraced.RECURSION_LIMIT, "2" ); final Phi cage = EOcageTest.encaged( new PhWith(new EOcageTest.Dummy(), 0, new Data.ToPhi(1L)) @@ -295,8 +295,8 @@ void doesNotThrowExceptionIfSmallDepth() { () -> new Dataized(cage).take(), String.format( "We expect that dataizing of nested cage which recursion depth is less than property %s = %s does not throw %s", - PhTraced.RECURSION_THRESHOLD, - System.getProperty(PhTraced.RECURSION_THRESHOLD), + PhTraced.RECURSION_LIMIT, + System.getProperty(PhTraced.RECURSION_LIMIT), ExAbstract.class ) ); @@ -316,8 +316,8 @@ void doesNotThrowExceptionIfMaxDepth() { () -> new Dataized(cage).take(), String.format( "We expect that dataizing of nested cage which recursion depth is equal to property %s = %s does not throw %s", - PhTraced.RECURSION_THRESHOLD, - System.getProperty(PhTraced.RECURSION_THRESHOLD), + PhTraced.RECURSION_LIMIT, + System.getProperty(PhTraced.RECURSION_LIMIT), ExAbstract.class ) ); @@ -335,8 +335,8 @@ void throwsExceptionIfBigDepth() { () -> new Dataized(cage).take(), String.format( "We expect that dataizing of nested cage which recursion depth is more than property %s = %s does not throw %s", - PhTraced.RECURSION_THRESHOLD, - System.getProperty(PhTraced.RECURSION_THRESHOLD), + PhTraced.RECURSION_LIMIT, + System.getProperty(PhTraced.RECURSION_LIMIT), ExAbstract.class ) );