Skip to content

Commit

Permalink
Fix tests after cherr-picking from main
Browse files Browse the repository at this point in the history
  • Loading branch information
marcphilipp committed Sep 23, 2024
1 parent 3ee20b7 commit db0334f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ ant = "1.10.13"
apiguardian = "1.1.2"
asciidoctorj-pdf = "2.3.9"
asciidoctor-plugins = "4.0.0-alpha.1" # Check if workaround in documentation.gradle.kts can be removed when upgrading
assertj = "3.24.2"
assertj = "3.26.3"
bnd = "6.4.0"
checkstyle = "10.12.1"
gradleVersionsPlugin = "0.47.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ void returnsSingleLockForSingleExclusiveResource() {
var locks = getLocks(resources, SingleLock.class);

assertThat(locks).hasSize(1);
assertThat(locks.getFirst()).isInstanceOf(ReadLock.class);
assertThat(locks.get(0)).isInstanceOf(ReadLock.class);
}

@Test
Expand All @@ -75,7 +75,7 @@ void reusesSameLockForExclusiveResourceWithSameKey() {

assertThat(locks1).hasSize(1);
assertThat(locks2).hasSize(1);
assertThat(locks1.getFirst()).isSameAs(locks2.getFirst());
assertThat(locks1.get(0)).isSameAs(locks2.get(0));
}

@Test
Expand Down Expand Up @@ -130,7 +130,7 @@ void usesSingleInstanceForGlobalReadWriteLock() {
}

private Lock getSingleLock(String key, LockMode lockMode) {
return getLocks(Set.of(new ExclusiveResource(key, lockMode)), SingleLock.class).getFirst();
return getLocks(Set.of(new ExclusiveResource(key, lockMode)), SingleLock.class).get(0);
}

private List<Lock> getLocks(Collection<ExclusiveResource> resources, Class<? extends ResourceLock> type) {
Expand Down

0 comments on commit db0334f

Please sign in to comment.