well, the issue is that the callback in the redis hash commands(i.e. flushdb, hgetall ) doesn't stop the particular async process making it hang. I am not sure whether the 'async' module isn't it stoping properly or the 'redis' module has something different that prohibits 'async' to close that process....if you know the answer, please, share.
The solution was 'mocha' test framework. After installing(i.e npm install mocha) and then running 'mocha test/mytest.js', it would exit without any changes to the above code...not even formatting according to Mocha framework, it runs the test and exits nicely. At the same time, it would hang if run with 'node test/mytest.js'....the mystery of why so still remains:)
I hope this helps...It's time for Mocha now:)