# ExclusiveLockTransactionTestRunnerxUnit.ConcurrentReadThenWriteWithoutExclusiveLock_ThrowsLockException(string)

[Type overview](/orleans/docs/api/csharp/microsoft.orleans.transactions.testkit.xunit/orleans.transactions.testkit.xunit.exclusivelocktransactiontestrunnerxunit/) | [Methods](/orleans/docs/api/csharp/microsoft.orleans.transactions.testkit.xunit/orleans.transactions.testkit.xunit.exclusivelocktransactiontestrunnerxunit/methods/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.Transactions.TestKit.xUnit/ExclusiveLockTransactionTestRunner.cs#L17)

```csharp
public override Task ConcurrentReadThenWriteWithoutExclusiveLock_ThrowsLockException(string grainStates)
```

Verifies that concurrent Read-then-Write transactions on the same grain cause OrleansTransactionLockUpgradeException or OrleansBrokenTransactionLockException when no exclusive lock is used. Scenario (LockUpgradeException): TX1: PerformRead → shared lock acquired TX2: PerformRead → shared lock acquired (same group) TX1: PerformUpdate → lock upgrade fails Scenario (BrokenTransactionLockException): TX1: PerformRead → shared lock acquired TX2: PerformRead → shared lock acquired (same group) TX2: PerformUpdate → upgraded, TX1 rolled back TX1: PerformUpdate → broken lock detected

### Parameters

- `grainStates` (`string`)
