-
Notifications
You must be signed in to change notification settings - Fork 592
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tail node and corresponding tests don't work on Windows #698
Comments
See also the comments in node-red/node-red#329 |
Have just pushed 43ad8706aa067646cf7a6281c1aee49898f3d5ec which fixes a timing window in the tail node tests. The test file was being written asynchronously to the test running - so it was possible that the file didn't exist when the test tried to use it. I've replaced that code with using a static file in the resources directory. I've also added some TODOs on the node itself - including one to move over to node-tail. Finally, we should add a test for when the file being tailed is deleted and recreated. This is why the |
Since the proposal is to switch to use node-tail and the current tail node isn't supposed to work on windows I'm just making a note here rather than proposing to fix the test....the tail node tests fail for me me on windows because there's an extra character found - "\r". Just to keep in mind there may still be differences between windows and linux. |
see also issue node-red/node-red#337 |
There are several packages that do the equivalent of tail... some claim to support files going away / being renamed - which is functionality we want... eg https://www.npmjs.org/package/always-tail and https://www.npmjs.org/package/tailfd ... so need to evaluate them to select the most appropriate (as well as https://www.npmjs.org/package/tail ) It would also be nice if they support the behaviour created by the -n 0 option of the real tail command - ie only output new lines. |
Now with test that works with it. Part of Issue #326 Now need to redo with libs that support windows.
In my testing, always-tail is the closest to what we want. If/when they accept my pull-request, it'll be perfect. |
Bumping from the 0.9 release; the PR still hasn't been accepted and the issue doesn't warrant holding up the release. |
Moved this issue over from the core repo so it follows the Tail node that was moved to this repo some time ago. |
There's a comment associated with the tail node saying "Linux and windows only". Would be nice if possible to make this work for Windows.
Also, the corresponding unit test fails on Windows, not only because the actual functionality doesn't work, but because there's a timing window where we look to write to the test file but the file does't exist. This has been seen once or twice on the Travis build. Note that the test uses
fs.unlinkSync(fileToTail);
which on linux deletes the file but on windows only deletes when the running process completes.
The text was updated successfully, but these errors were encountered: