shanmugh commented on a change in pull request #41: Memoize loader.load and loader.load_json URL: https://github.com/apache/aurora/pull/41#discussion_r222021637
########## File path: src/test/python/apache/aurora/config/test_loader.py ########## @@ -93,6 +101,44 @@ def test_load_json_single(): assert new_job == job +def test_load_json_memoized(): + """ + This test reads 2 jobs from the MESOS_CONFIG_MULTI string. + It then tests memoization by: + 1. write job[0] as json to tmp/config.json + 2. load_json(tmp/config.json, is_memozied=True) to prime the cache + 3. overwrite tmp/config.json with job[1] as json. + 4. call load_json(tmp/config.json, is_memoized=True) and verify that job[0] is read Review comment: Maybe I am misunderstanding the requirements here. The contract of `AuroraConfigLoader` should be to load a configuration from a file or string or a resource. If the input changes the configuration that built should reflect that? It will be clearer if there is a comment stating that memoization in `AuroraConfigLoader` is only intended to be used for this particular style of usage. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services