vishalanandl177/DRF-API-Logger

Unable to destroy test db after using this library.

pawan-betrics opened this issue · 8 comments

Everything was working fine, after install this lib my django test CI failed. Test database is not destroying and raising
I am 100% sure, session is used by drf-api-logger.

django.db.utils.OperationalError: database "test_betrics_db" is being accessed by other users DETAIL: There is 1 other session using the database.

Hi @pawan-betrics,
Can you please share some info related to your test cases?

`Creating test database for alias 'default'...
Found 15 test(s).
System check identified no issues (0 silenced).
...............

Ran 15 tests in 9.951s

OK
Destroying test database for alias 'default'...
DRF API LOGGER EXCEPTION: relation "drf_api_logs" does not exist
LINE 1: INSERT INTO "drf_api_logs" ("added_on", "api", "headers", "b...`

I get only this from CI terminal

Like Why Test cases using drf_api_logs models ?

Hi @pawan-betrics
I have identified the issue, soon It'll be fixed

Okay Great

3cp commented

@vishalanandl177 any follow-up on this issue?

Hi @pawan-betrics & @3cp.
Thanks for pointing out the issue but I'm not able to replicate the same issue. I tested in EC2 and K8s PODs.
Ca you please let me know the scenario and the system arch where you are facing the same issue?

Closing due to inactivity.