Skip to content

Commit f4591ae

Browse files
committed
test: investigate hanging failover test
1 parent 40288e8 commit f4591ae

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

.github/workflows/integration_tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
strategy:
1919
fail-fast: false
2020
matrix:
21-
python-version: [ "3.8", "3.11" ]
21+
python-version: [ "3.11" ]
2222
engine-version: [ "lts", "latest" ]
2323
environment: ["mysql"]
2424

aws_advanced_python_wrapper/plugin_service.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -406,28 +406,36 @@ def set_current_connection(self, connection: Optional[Connection], host_info: Op
406406

407407
if is_in_transaction and WrapperProperties.ROLLBACK_ON_SWITCH.get_bool(self.props):
408408
try:
409+
logger.info("Rolling back connection")
409410
old_connection.rollback()
410-
except Exception:
411+
except Exception as e:
412+
logger.error(f"Failed to rollback connection: {e}")
411413
# Ignore any exception.
412414
pass
413415

416+
logger.info("notify_connection_changed")
414417
old_connection_suggested_action = \
415418
self._container.plugin_manager.notify_connection_changed({ConnectionEvent.CONNECTION_OBJECT_CHANGED})
416419

417420
if old_connection_suggested_action != OldConnectionSuggestedAction.PRESERVE and not self.driver_dialect.is_closed(old_connection):
418421

419422
try:
423+
logger.info("apply_pristine_session_state")
420424
self.session_state_service.apply_pristine_session_state(old_connection)
421-
except Exception:
425+
except Exception as e:
426+
logger.error(f"Failed to apply pristine session state to old connection: {e}")
422427
# Ignore any exception.
423428
pass
424429

425430
try:
431+
logger.info("closing old connection")
426432
old_connection.close()
427433
except Exception:
434+
logger.error(f"Failed to close old connection: {e}")
428435
# Ignore any exception.
429436
pass
430437
finally:
438+
logger.info("Complete connection update")
431439
self.session_state_service.complete()
432440

433441
@property

0 commit comments

Comments
 (0)