vishalanandl177 / DRF-API-Logger

An API Logger for your Django Rest Framework project.
https://github.com/vishalanandl177/DRF-API-Logger
Apache License 2.0
308 stars 56 forks source link

Unable to destroy test db after using this library. #58

Closed pawan-betrics closed 1 year ago

pawan-betrics commented 2 years ago

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.

vishalanandl177 commented 2 years ago

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

pawan-betrics commented 2 years ago

`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

pawan-betrics commented 2 years ago

Like Why Test cases using drf_api_logs models ?

vishalanandl177 commented 2 years ago

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

pawan-betrics commented 2 years ago

Okay Great

3cp commented 1 year ago

@vishalanandl177 any follow-up on this issue?

vishalanandl177 commented 1 year ago

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?

vishalanandl177 commented 1 year ago

Closing due to inactivity.