-
Notifications
You must be signed in to change notification settings - Fork 92
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
More efficient lastLocation
handling in watch mode
#187
Conversation
Though `.watch` actually ran decent test coverage of push mode, JaCoCo did not show `Watcher` since all the tests ran on agents in another JVM. Adding a mode to run on-controller since people do sometimes do that, and it should show up in JaCoCo, and log messages from the watcher go to test output which is helpful.
This comment was marked as resolved.
This comment was marked as resolved.
…un e.g. `mvn test -Dtest="BourneShellScriptTest#binaryCaching[0: ON_CONTROLLER]"`
…ion of `binaryPath`
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-surefire-plugin</artifactId> | ||
<dependencies> | ||
<!-- https://github.com/jenkinsci/plugin-pom/pull/560#issuecomment-1656232490 --> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FilePath lastLocationFile = controller.getLastLocationFile(workspace); | ||
if (lastLocationFile.exists()) { | ||
lastLocation = Long.parseLong(lastLocationFile.readToString()); | ||
LOGGER.finest(() -> "Loaded lastLocation=" + lastLocation); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems to actually be missing from test coverage in this plugin currently; workflow-durable-task-step
does exercise it in tests relating to agent disconnections and controller restarts.
Since the task recurs every 100ms, it seems unnecessary to read a file that we just wrote to disk.