Writethrough when saving files, add Netkan tests#4392
Merged
Conversation
Pull Request Test Coverage Report for Build 15655094302Details
💛 - Coveralls |
bb1dadf to
ca1465e
Compare
Member
Author
|
I'm sorry that you're mad, @coveralls, but the previous number was inflated due to the former inclusion of |
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Motivations
GUIConfig.xmlcould become corrupted. Generally this takes the form of the entire file being populated byNULcharacters on Windows, and we've seen it a few times for JSON files as well. Some browsing of StackExchange indicated that this may be due to filesystem caching and buffering of various sorts delaying the file from being written past the point of something that stops it.Netkan/SourcesandNetkan/Transformersthat have no coverage at all currently and can be tested fairly easily._build,Tests, andConsoleUIin the coverage stats, which is not optimal:_buildisn't a real code folder.Testsdoes not contain any end-user app code.ConsoleUIis purely UI and not testable because the difference between good or bad outcomes are things like, does that look right? does it make sense to a human?(A similar argument could be made for GUI, but there we do actually have a few meaningful tests and could conceivably add more, especially of the
Modelclasses.)Changes
FileOptions.WriteThroughto strongly encourage Windows to actually write our various JSON files to disk when we ask it to. This might conceivably slow down response times slightly in some cases, but that trade-off is worth the benefit of greater robustness.FlakyNetworkcategory to increase coverage. Of all the servers we use, SpaceDock is currently the only one truly deserving of that label.IHttpServiceobjects that are then used by the real API objects.ConsoleUI,Tests, and_buildfolders are now excluded from Coveralls (hopefully).