add: config db-timezone-enabled for optional querying of timezones
To avoid repeated querying of `pg_timezone_names` every time schema cache is reset, `Prefer: timezone` can be disabled by setting `db-timezone-enabled = false`. Signed-off-by: Taimoor Zaeem <taimoorzaeem@gmail.com>
This commit is contained in:
committed by
Steve Chavez
parent
bd5de884fa
commit
d6c338d588
+10
-1
@@ -128,6 +128,7 @@ main = do
|
||||
unicodeApp = appDbs testUnicodeCfg
|
||||
multipleSchemaApp = appDbs testMultipleSchemaCfg
|
||||
ignorePrivOpenApi = appDbs testIgnorePrivOpenApiCfg
|
||||
timezoneDisabled = appDbs testCfgTimezoneDisabled
|
||||
|
||||
|
||||
let analyze :: IO ()
|
||||
@@ -157,7 +158,6 @@ main = do
|
||||
, ("Feature.Query.PlanSpec.disabledSpec" , Feature.Query.PlanSpec.disabledSpec)
|
||||
, ("Feature.Query.Preferences.HandlingSpec" , Feature.Query.Preferences.HandlingSpec.spec)
|
||||
, ("Feature.Query.Preferences.MaxAffectedSpec" , Feature.Query.Preferences.MaxAffectedSpec.spec)
|
||||
, ("Feature.Query.Preferences.TimezoneSpec" , Feature.Query.Preferences.TimezoneSpec.spec)
|
||||
, ("Feature.Query.QuerySpec" , Feature.Query.QuerySpec.spec)
|
||||
, ("Feature.Query.RawOutputTypesSpec" , Feature.Query.RawOutputTypesSpec.spec)
|
||||
, ("Feature.Query.RelatedQueriesSpec" , Feature.Query.RelatedQueriesSpec.spec)
|
||||
@@ -257,6 +257,15 @@ main = do
|
||||
parallel $ before withApp $
|
||||
describe "Feature.Query.AggregateFunctionsDisallowedSpec." Feature.Query.AggregateFunctionsSpec.disallowed
|
||||
|
||||
-- this test runs with db-timezone-enabled = true
|
||||
parallel $ before withApp $
|
||||
describe "Feature.Query.Preferences.TimezoneSpec.enabledSpec" Feature.Query.Preferences.TimezoneSpec.enabledSpec
|
||||
|
||||
-- this test runs with db-timezone-enabled = false
|
||||
parallel $ before timezoneDisabled $
|
||||
describe "Feature.Query.Preferences.TimezoneSpec.disabledSpec" Feature.Query.Preferences.TimezoneSpec.disabledSpec
|
||||
|
||||
|
||||
-- Note: the rollback tests can not run in parallel, because they test persistance and
|
||||
-- this results in race conditions
|
||||
|
||||
|
||||
Reference in New Issue
Block a user