1717from eventsourcing .persistence import ProgrammingError
1818from eventsourcing .postgres import PostgresApplicationRecorder , PostgresDatastore
1919from examples .coursebooking .application import EnrolmentWithAggregates
20+ from examples .coursebookingdcb .application import EnrolmentWithDCB
2021from examples .coursebookingdcb .postgres_ts import (
2122 PG_FUNCTION_NAME_DCB_CHECK_APPEND_CONDITION_TS ,
2223 PG_FUNCTION_NAME_DCB_INSERT_EVENTS_TS ,
3536
3637env = {}
3738# SPEEDRUN_DB_NAME = "course_subscriptions_speedrun"
38- SPEEDRUN_DB_NAME = "course_subscriptions_speedrun_tt"
39- # SPEEDRUN_DB_NAME = "course_subscriptions_speedrun_tt2"
39+ # SPEEDRUN_DB_NAME = "course_subscriptions_speedrun_tt"
40+ SPEEDRUN_DB_NAME = "course_subscriptions_speedrun_tt2"
4041SPEEDRUN_DB_USER = "eventsourcing"
4142SPEEDRUN_DB_PASSWORD = "eventsourcing" # noqa: S105
4243
@@ -65,7 +66,7 @@ def inf_range() -> Iterator[int]:
6566 },
6667 ),
6768 "dcb-pg-tt" : (
68- EnrolmentWithDCBRefactored ,
69+ EnrolmentWithDCB ,
6970 10 ,
7071 {
7172 "PERSISTENCE_MODULE" : "eventsourcing.dcb.postgres_tt" ,
@@ -74,9 +75,9 @@ def inf_range() -> Iterator[int]:
7475 "POSTGRES_PORT" : "5432" ,
7576 "POSTGRES_USER" : SPEEDRUN_DB_USER ,
7677 "POSTGRES_PASSWORD" : SPEEDRUN_DB_PASSWORD ,
77- "POSTGRES_POOL_SIZE" : "1 " ,
78- "POSTGRES_MAX_OVERFLOW" : "0 " ,
79- "POSTGRES_MAX_WAITING" : "0 " ,
78+ "POSTGRES_POOL_SIZE" : "5 " ,
79+ "POSTGRES_MAX_OVERFLOW" : "5 " ,
80+ "POSTGRES_MAX_WAITING" : "5 " ,
8081 },
8182 ),
8283 "dcb-mem" : (
@@ -139,7 +140,7 @@ def count_events(app: EnrolmentInterface) -> int:
139140 result = conn .execute (statement ).fetchone ()
140141 count = result ["count" ] if result is not None else 0
141142
142- elif isinstance (app , EnrolmentWithDCBRefactored ):
143+ elif isinstance (app , ( EnrolmentWithDCBRefactored , EnrolmentWithDCB ) ):
143144 recorder = app .recorder
144145 assert isinstance (recorder , (PostgresDCBRecorderTS , PostgresDCBRecorderTT ))
145146 datastore = recorder .datastore
0 commit comments