micro-analytics/micro-analytics-cli

Connection leaks in adapter tests

Open

#75 geöffnet am 29. Juni 2017

Auf GitHub ansehen
 (0 Kommentare) (1 Reaktion) (0 zugewiesene Personen)JavaScript (52 Forks)batch import
adapter-testshelp wanted

Repository-Metriken

Stars
 (738 Stars)
PR-Merge-Metriken
 (Keine gemergten PRs in 30 T)

Beschreibung

The adapter tests does not close connection correctly resulting in tests for the redis adapter never quitting.

The problem is the at the moment is call init should not throw. Overwrites the connections with new one and then when the tests closes connection in afterEach the connection created in beforeEach is not closed.

I think it would be a good thing to require adapter.close() and handle the closing of database connections in the adapter utils.

Contributor Guide