On Wed, Feb 13, 2013 at 2:11 PM, TJ <[email protected]> wrote:
> On 13/02/13 12:47, Ben Noordhuis wrote:
>>> diff --git a/test/common.js b/test/common.js
>>> index 7b4c0bc..4cbdea6 100644
>>> --- a/test/common.js
>>> +++ b/test/common.js
>>> @@ -59,6 +59,10 @@ if (process.platform === 'win32') {
>>>    exports.PIPE = exports.tmpDir + '/test.sock';
>>>  }
>>>  +// node doesn't unlink sockets when server.close() is called so do it 
>>> manually
>>> +if (fs.existsSync(exports.PIPE))
>>> +  fs.unlinkSync(exports.PIPE);
>>> +
>>>  var util = require('util');
>>>  for (var i in util) exports[i] = util[i];
>>>  //for (var i in exports) global[i] = exports[i];
>>> --
>>> 1.8.1.2.433.g9808ce0.dirty
>>
>> The test runner - tools/test.py - is supposed to clean out the temp
>> directory after each test.
>
> Thanks for the pointer, I wasn't aware of that. I've looked at that code but 
> don't see anything that will clean-up after a test.
>
> TestCase.AfterRun() and TestCase.CleanUp() look to be where such 
> functionality ought to be, but are No-ops.

That's because the magic happens in test/simple/testcfg.py :-)

>> It's not that I oppose this patch (though it should be submitted as a
>> GH PR) but it doesn't seem necessary.
>>
>
> Without it multiple tests fail (here, on Linux). test-cluster-http-pipe 
> creates "test/tmp/test.sock" (from common.PIPE) but doesn't unlink it. The 
> next test that tries to create the socket -
> test-http-client-pipe-end - then fails with EADDRINUSE and so do several 
> other subsequent tests.
>
> Maybe a better fix would be to implement the full clean-up in tools/test.py 
> of the test/tmp/ directory after each test?

Strange, I'm not able to reproduce that.  (Unless I invoke the tests
manually, of course.)

> I'm posting to the mailing-list for review and comment. When the final, 
> correct, solution is identified I'll issue a pull request

-- 
-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to