diff --git a/samcli/local/docker/durable_functions_emulator_container.py b/samcli/local/docker/durable_functions_emulator_container.py index 02db99a9acf..74fb575cd04 100644 --- a/samcli/local/docker/durable_functions_emulator_container.py +++ b/samcli/local/docker/durable_functions_emulator_container.py @@ -50,13 +50,6 @@ class DurableFunctionsEmulatorContainer: """ ENV_STORE_TYPE = "DURABLE_EXECUTIONS_STORE_TYPE" - """ - Allow overriding the timescale used by the emulator. For example, if you have - a context.wait(3 months), you probably don't want to actually wait 3 months in - a local development loop. This lets you override that! - """ - ENV_TIME_SCALE = "DURABLE_EXECUTIONS_TIME_SCALE" - """ Capture the logs from the emulator on cleanup - this can be useful for debugging what happened, since once the container is gone, the logs are too. @@ -153,10 +146,6 @@ def _get_emulator_store_type(self): LOG.debug(f"Creating durable functions emulator container with store type: {store_type}") return store_type - def _get_emulator_time_scale(self): - """Get the execution time scale from environment variable or use default timescale of 1.""" - return os.environ.get(self.ENV_TIME_SCALE, "1") - def _get_emulator_data_dir(self): """Get the path to the emulator data directory.""" return os.path.join(os.getcwd(), self._EMULATOR_DATA_DIR_NAME) @@ -181,9 +170,7 @@ def _get_emulator_environment(self): """ Get the environment variables for the emulator container. """ - return { - "DURABLE_EXECUTION_TIME_SCALE": self._get_emulator_time_scale(), - } + return {} @property def _docker_client(self) -> docker.DockerClient: diff --git a/tests/unit/local/docker/test_durable_functions_emulator_container.py b/tests/unit/local/docker/test_durable_functions_emulator_container.py index 534bc9dd70a..25bdd174437 100644 --- a/tests/unit/local/docker/test_durable_functions_emulator_container.py +++ b/tests/unit/local/docker/test_durable_functions_emulator_container.py @@ -300,21 +300,18 @@ def test_binary_selection_by_architecture(self, arch, expected_binary, mock_get_ @parameterized.expand( [ - # (name, env_vars, expected_port, expected_store, expected_scale) - ("default_config", {}, 9014, "sqlite", "1"), - ("custom_port", {"DURABLE_EXECUTIONS_EMULATOR_PORT": "9999"}, 9999, "sqlite", "1"), - ("filesystem_store", {"DURABLE_EXECUTIONS_STORE_TYPE": "filesystem"}, 9014, "filesystem", "1"), - ("custom_time_scale", {"DURABLE_EXECUTIONS_TIME_SCALE": "0.5"}, 9014, "sqlite", "0.5"), + # (name, env_vars, expected_port, expected_store) + ("default_config", {}, 9014, "sqlite"), + ("custom_port", {"DURABLE_EXECUTIONS_EMULATOR_PORT": "9999"}, 9999, "sqlite"), + ("filesystem_store", {"DURABLE_EXECUTIONS_STORE_TYPE": "filesystem"}, 9014, "filesystem"), ( "all_custom", { "DURABLE_EXECUTIONS_EMULATOR_PORT": "8888", "DURABLE_EXECUTIONS_STORE_TYPE": "filesystem", - "DURABLE_EXECUTIONS_TIME_SCALE": "2.0", }, 8888, "filesystem", - "2.0", ), ] ) @@ -329,7 +326,6 @@ def test_create_container( env_vars, expected_port, expected_store, - expected_scale, mock_path_exists, mock_getcwd, mock_makedirs, @@ -364,7 +360,7 @@ def test_create_container( # Verify environment variables environment = call_args.kwargs["environment"] - self.assertEqual(environment["DURABLE_EXECUTION_TIME_SCALE"], expected_scale) + self.assertEqual(environment, {}) # Verify volumes volumes = call_args.kwargs["volumes"]