Mercurial > p > roundup > code
diff test/test_liveserver.py @ 7819:0fe2b9f6e19f
issue2551212 - enable wsgi cache_tracker by default
Switch the code so the wsgi cache_tracker optimization is enabled by
default. Leave the unoptimized/uncached code path available in case it
breaks something. The feature flag can be set to False to disable
caching.
Updated tests to test the disabled (non-cache) code path.
Updated upgrading.txt with info on how to disable caching.
| author | John Rouillard <rouilj@ieee.org> |
|---|---|
| date | Wed, 20 Mar 2024 17:13:30 -0400 |
| parents | 1b5daee24dc7 |
| children | 80cf6098ea65 |
line wrap: on
line diff
--- a/test/test_liveserver.py Wed Mar 20 12:06:46 2024 -0400 +++ b/test/test_liveserver.py Wed Mar 20 17:13:30 2024 -0400 @@ -127,7 +127,9 @@ i18n.DOMAIN = cls.backup_domain def create_app(self): - '''The wsgi app to start - no feature_flags set.''' + '''The wsgi app to start - no feature_flags set. + Post 2.3.0 this enables the cache_tracker feature. + ''' if _py3: return validator(RequestDispatcher(self.dirname)) @@ -1215,13 +1217,13 @@ f = requests.get(self.url_base() + "?@search_text=RESULT") self.assertIn("foo bar", f.text) -class TestFeatureFlagCacheTrackerOn(BaseTestCases, WsgiSetup): +class TestFeatureFlagCacheTrackerOff(BaseTestCases, WsgiSetup): """Class to run all test in BaseTestCases with the cache_tracker - feature flag enabled when starting the wsgi server + feature flag disabled when starting the wsgi server """ def create_app(self): - '''The wsgi app to start with feature flag enabled''' - ff = { "cache_tracker": "" } + '''The wsgi app to start with feature flag disabled''' + ff = { "cache_tracker": False } if _py3: return validator(RequestDispatcher(self.dirname, feature_flags=ff)) else: @@ -1232,7 +1234,7 @@ @skip_postgresql class TestPostgresWsgiServer(BaseTestCases, WsgiSetup): """Class to run all test in BaseTestCases with the cache_tracker - feature flag enabled when starting the wsgi server + feature enabled when starting the wsgi server """ backend = 'postgresql'
