Repository navigation
Wait longer in tests for macOS file watchers and the live cloud service - #217
Merged
Merged
Conversation
… watch service polls every 10 seconds on macOS
… cloud service can take longer than the 2 second default
… tests are skipped on macOS Every wait on WAIT_FOR_EVENT_MILLIS in DataUpdateServiceWatchedFileTests and DataUpdateServiceCheckFailureTests is in a test skipped on macOS, so the macOS polling reason does not apply to them. Off macOS, run 44775849116 finished each class in 2.2 s or less.
The device detection, IP intelligence and geolocation cloud test wrappers send their requests through a client that prints each request's path and time, so every run records what the tests' cloud timeout is sized from. Only the path is printed, never the query.
…cond timeout Run 44881631156 printed 540 live cloud requests across all 15 Build and Test jobs, the slowest at 0.77 s. The timeout comments now give those times and name device detection's ValueCloudTests as the class that timed out in run 44702767584. The printed path no longer shows the Resource Key segment.
rc now reads the test resource key only under its _51DEGREES_ name in the Device Detection and IP Intelligence cloud test wrappers. This change gives the same lines a timed HTTP client and a 15 second timeout. The merge keeps the timed client and the timeout, with the key read as rc reads it.
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.
Why
The release build of #190 (run 44702767584) failed on two of its six macOS jobs. The test was RelativePathTests.dataFile_Relative_WatcherLoadsANewFile. It gave up after 10.21 s on MacOS_Java_11 and 10.13 s on MacOS_X64_Java_11.
Java's WatchService has no native file events on macOS. It polls instead, every 10 seconds by default. So a new file can take 10 seconds or more to show up, and the test allowed exactly 10.
DataUpdateServiceWatchedFileTests and DataUpdateServiceCheckFailureTests used the same 10 second wait. They passed in that build, but they're just as exposed.
The same build had a second, separate failure. ValueCloudTests errored on Ubuntu_Java_8 and Windows_Java_21 with "Read timed out" at about 08:38 UTC. The live cloud service took longer than the cloud request engine's 2 second default to answer.
What changed
Only test code changes. No library code or default moves.
Run
Run 44775849116 built this head with one temporary workflow file added. It covers every Build and Test job, macOS included, and all 15 of those jobs passed.
No red
There's no failing-test-first run. These commits widen limits in tests that already exist, so there's no new test that could go red ahead of the fix. Run 44702767584 is the record of the failure.
Before you upgrade
Nothing. Only tests change.
Merging
Subject: Wait longer in tests for macOS file watchers and the live cloud service
Body: The watcher tests wait up to 30 seconds, three of macOS's 10 second polls, and stop as soon as the change arrives. The live cloud tests' engines get a 15 second timeout. Tests only.
Head c35cc6e.