Skip to content

Commit 971ca1e

Browse files
author
Yegor Bugayenko
committed
failed
1 parent 0c1b371 commit 971ca1e

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/test/java/co/stateful/RtLocksITCase.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,4 +132,15 @@ public void locksAndUnlocksInOneThread() throws Exception {
132132
}
133133
}
134134

135+
/**
136+
* RtLocks can reject an incorrect name of a lock.
137+
* @throws Exception If some problem inside
138+
*/
139+
@Test(expected = IllegalArgumentException.class)
140+
public void rejectsIncorrectLockName() throws Exception {
141+
final Sttc sttc = this.srule.get();
142+
final Locks locks = sttc.locks();
143+
locks.get("invalid name with spaces").lock();
144+
}
145+
135146
}

0 commit comments

Comments
 (0)