linagora / james-project

Mirror of Apache James Project
Apache License 2.0
70 stars 63 forks source link

[Postgres] Fix PostgresAuthenticationTest #5099

Closed hungphan227 closed 6 months ago

hungphan227 commented 6 months ago

Why

When running this class, all tests in the class pass but the whole class fail because PostgresExtension try to run SQL query (in aftereach method) but all postgres connections have been closed by afterall method.

How

When using JamesServerExtension.Lifecycle.PER_ENCLOSING_CLASS, the afterall method of PostgresExtension is run before the after each method. Update JamesServerExtension to fix the order of running

hungphan227 commented 6 months ago

pr https://github.com/apache/james-project/pull/2072