-
Notifications
You must be signed in to change notification settings - Fork 182
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
Failing tests #6955
Comments
Not every test fails; for example, https://github.com/Charcoal-SE/SmokeDetector/commit/2e6783c67371f43192757b332345550944508ce3/checks succeeded just now. |
This should partially resolve Charcoal-SE#6955. There's at least one more test failing intermittently, but this should resolve the majority. autopull
The closure of this issue was automated by GitHub as a result of my saying "partially resolve #[issue number]" in the commit. Apparently, it's just looking for "resolve #[issue number]" in order to invoke auto-close. That commit should resolve the majority of the failures we've seen, but we'll have to wait to see, as the issue was that tests that didn't fully set up the test environment were being run without having previously run a test earlier in the file which did set it up (i.e. the tests were not independent). That's very likely what's happening with the other test which appears to be failing:
I'll take a look at that one too, but probably later. |
Another potentially related CI failure:
|
There have been multiple additional failures in test/test_chatcommunicate.py (e.g. 1, 2, 3). While this is an annoyance wrt. having the CI tests fail, it does reveal a real issue, which is that chatcommunicate.py is substantially lacking wrt. thread safety. I've looked through the code in chatcommunicate.py and made edits to fix that. Before submitting a PR, I still need to check if there are other portions of the code which access or modify chatcommunicate.py's globals and make sure they use the new locks. Then, some testing to verify that there aren't any obvious deadlocks created. |
For the issue you mention in the initial comment here when running the tests locally, that appears to be that the I'm sorry, I should have explicitly mentioned to you that the requirement.txt file had been updated. I also recently added As for testing locally, my personal choice was to change the script which I use to start the tests to have pytest run the tests in parallel in order to substantially reduce the overall elapsed time, but use OS scripting methods to reduce the priority of the tests, so that running them doesn't interfere with my local system being interactive. If you do choose to run them in parallel, I'd suggest setting the number of threads to use to one more than the number of CPU cores which you are willing to have working on the task. The tests are configured such that one thread starts up first running the long DNS based verification test, which is very network bound and takes very little CPU. All remaining threads will tend to be first occupied by CPU intensive tasks. For example, when wanting to primarily allocate 4 CPU cores to the testing, I use |
Thanks for the tips. For the record, I probably installed |
For the failure which is
I added some extra printing, both of the data structures being tested and the raw file contents, as read within the test. The most recent error on Circle CI of this type shows the raw text contents of the file, as read by SD, doesn't have the line for that user (last lines of output in the "Pytest" section). However, the line for that user does, in fact, exist in the file when is checked out of There's another issue with tests which involve reading from disk which also is intermittently causing errors. I haven't tracked it as far as this one, but the |
I've added Hmmmm... what could be happening for these is that the file contents are changing due to us performing |
It looks like this CircleCI test run confirms that the contents of the users.yml file which are read in the |
As to the more prevalent sporadic errors (at least 3 today: 1, 2, 3:
which I mention above, I've been working on adding threading locks on quite a bit of stuff which we use across threads, both in CI testing, but more importantly in normal operation of SD. Some of those changes should address the above issue, or at least reduce it. Given that those changes are adding a bunch of locks, I'd prefer to wait for the weekend to put them in. I'll try to get what I have so far into a PR in the next day or two. While I've made a lot of changes, there's still substantial sections of code which need to be reviewed for thread safety. In addition to the changes I have so far for our code, I also have changes for the |
What problem has occurred? What issues has it caused?
Several of the recent tests are failures, possibly due to the recent refactoring #6948
For example, https://github.com/Charcoal-SE/SmokeDetector/runs/6320800336?check_suite_focus=true failed with the error traceback below.
What would you like to happen/not happen?
Tests should succeed when nothing is wrong (-:
May be relevant: When I run the tests locally, I get this warning:
Here is the traceback from the example:
The text was updated successfully, but these errors were encountered: