Skip to content
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

in_tail: Untracked files should be removed from watching list. fix #1455 #1467

Merged
merged 4 commits into from
Feb 16, 2017

Conversation

repeatedly
Copy link
Member

No description provided.

@repeatedly
Copy link
Member Author

@t-osakada Could you try this patch on your environment?

@repeatedly
Copy link
Member Author

@tagomoris Could you check this patch?

@repeatedly repeatedly requested a review from tagomoris February 15, 2017 20:57
@tagomoris
Copy link
Member

@repeatedly refer the issue which this patch will solve about

@repeatedly
Copy link
Member Author

Ah, fix #1455 in the title doesn't refer it.

Copy link
Member

@tagomoris tagomoris left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add tests.

@t-osakada
Copy link
Contributor

@repeatedly I confirmed that it solved. Thanks!

@repeatedly
Copy link
Member Author

@tagomoris Do you mean need test to count Ruby's object, e.g. TimerWatcher?
This patch doesn't break existing behaviour.

@tagomoris
Copy link
Member

@repeatedly right.

@repeatedly
Copy link
Member Author

test added

Copy link
Member

@tagomoris tagomoris left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added some comments on test code.
Please add fixes for it, and go forward.


assert_equal 1, d.instance.instance_variable_get(:@tails).keys.size
File.unlink("#{TMP_DIR}/tail.txt")
sleep 2
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be waiting(5){ sleep 0.1 until the_size_of_tails == 0 } instead of just sleep 2 for stability.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is good. Will fix.

sleep 2
assert_equal 0, d.instance.instance_variable_get(:@tails).keys.size

base_num = count_timer_object
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you want to confirm that the number of timer watcher does not increase anymore, right?
Please add the comment what you are checking if so.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why comment is needed? Hard to understand from the code?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. The name of test case doesn't explain what to do here.

@repeatedly repeatedly force-pushed the fix-in_tail-memory-bloat branch from 6aa343c to 4680963 Compare February 16, 2017 13:38
@repeatedly repeatedly force-pushed the fix-in_tail-memory-bloat branch from be60a57 to 030045a Compare February 16, 2017 14:30
@repeatedly
Copy link
Member Author

Fix unstable test on windows. Let's merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants