SystemPropertyHelper { public static boolean restoreSetOperationTransactionBehavior() { return getProductBooleanProperty("restoreSetOperationTransactionBehavior").orElse(false); }  static Optional<Boolean> getProductBooleanProperty(String name); static Optional<Integer> getProductIntegerProperty(String name); static Optional<String> getProductStringProperty(String name); static String getProperty(String name); static boolean restoreSetOperationTransactionBehavior(); static boolean restoreIdleExpirationBehavior(); static final String GEODE_PREFIX; static final String GEMFIRE_PREFIX; static final String EVICTION_SCAN_ASYNC; static final String EVICTION_SCAN_MAX_THREADS; static final String EVICTION_SCAN_THRESHOLD_PERCENT; static final String EVICTION_SEARCH_MAX_ENTRIES; static final String EARLY_ENTRY_EVENT_SERIALIZATION; static final String DEFAULT_DISK_DIRS_PROPERTY; static final String HA_REGION_QUEUE_EXPIRY_TIME_PROPERTY; static final String THREAD_ID_EXPIRY_TIME_PROPERTY; static final String PERSISTENT_VIEW_RETRY_TIMEOUT_SECONDS; static final String USE_HTTP_SYSTEM_PROPERTY; static final String PACKAGES_TO_SCAN; static final String PARALLEL_DISK_STORE_RECOVERY; }
@Test public void testRestoreSetOperationTransactionBehaviorDefaultToFalse() { assertThat(SystemPropertyHelper.restoreSetOperationTransactionBehavior()).isFalse(); }
@Test public void testRestoreSetOperationTransactionBehaviorSystemProperty() { String gemfirePrefixProperty = "gemfire." + restoreSetOperationTransactionBehavior; System.setProperty(gemfirePrefixProperty, "true"); assertThat(SystemPropertyHelper.restoreSetOperationTransactionBehavior()).isTrue(); System.clearProperty(gemfirePrefixProperty); String geodePrefixProperty = "geode." + restoreSetOperationTransactionBehavior; System.setProperty(geodePrefixProperty, "true"); assertThat(SystemPropertyHelper.restoreSetOperationTransactionBehavior()).isTrue(); System.clearProperty(geodePrefixProperty); }
@Test public void testRestoreSetOperationTransactionBehaviorGeodePreference() { String gemfirePrefixProperty = "gemfire." + restoreSetOperationTransactionBehavior; String geodePrefixProperty = "geode." + restoreSetOperationTransactionBehavior; System.setProperty(geodePrefixProperty, "false"); System.setProperty(gemfirePrefixProperty, "true"); assertThat(SystemPropertyHelper.restoreSetOperationTransactionBehavior()).isFalse(); System.clearProperty(geodePrefixProperty); System.clearProperty(gemfirePrefixProperty); }