FileLockCommunicatorTest.groovy

Clone Tools
  • last updated a few seconds ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
Run perf with loopback

  1. … 14 more files in changeset.
Revert "Merge pull request #7838 from gradle/eskatos/messaging/bind-loopback-if-available"

Listening to the loopback device seems to cause some connection issues

to the daemon from IDEA. Reverting the change for now.

This reverts commit 9a940b21ee06ed0b5c83b7d88f7d191a0d7a590e, reversing

changes made to 18b1f6e10f32f623986868bb39e083b49467b16e.

  1. … 6 more files in changeset.
Prefer loopback bind address if available for IPC

Keep file lock communicator bound to wildcard address

Signed-off-by: Paul Merlin <paul@gradle.com>

  1. … 6 more files in changeset.
Prefer loopback bind address if available for IPC

Keep file lock communicator bound to wildcard address

Signed-off-by: Paul Merlin <paul@gradle.com>

  1. … 6 more files in changeset.
Prefer loopback bind address if available for IPC

Keep file lock communicator bound to wildcard address

Signed-off-by: Paul Merlin <paul@gradle.com>

  1. … 6 more files in changeset.
Handle missing type correctly

When communicating with an old version, the length of the received

packet will be shorter than the byte array. Now, `FileLockPacketPayload`

only reads the type when it has been received and returns UNKNOWN if it

has not. Previously, it would have worked by accident because the last

byte was zero which corresponds to the ordinal number of UNKNOWN.

  1. … 3 more files in changeset.
Make file lock packet type explicit

`FileLockCommunicator` now includes an additional byte that represents

the `FileLockPacketType` when sending packets to other processes.

`DefaultFileLockContentionHandler` now checks for the

`LOCK_RELEASE_CONFIRMATION` type instead of interpreting any packet for

a lock for which it already has received a packet as a lock release

confirmation.

Adding the additional byte will be ignored by old versions which only

read the first 9 bytes. New versions can still read packets from old

versions that do not include the byte. They use the `UNKNOWN` type in

this case. Thus, this protocol change is backwards compatible.

  1. … 5 more files in changeset.
Fix classycle issue

+review REVIEW-6562

    • -0
    • +99
    ./FileLockCommunicatorTest.groovy
  1. … 6 more files in changeset.
Only send ping for lock release once

  1. … 6 more files in changeset.