Skip to content

2.23.1.0-b195

Summary:
The `assertThrows` method of JUnit helps to improve readability of java unit tests in some cases.

Original code

```
      try {
        s1.executeBatch();
        fail("Internal retries are not supported in batched execution mode");
      } catch (BatchUpdateException e) {
        LOG.info(e.toString());
      }
```

Same code with `assertThrows`

```
      assertThrows("Internal retries are not supported in batched execution mode", BatchUpdateException.class, () -> s1.executeBatch());
```

**Note:** JUnit supports `assertThrows` since version 4.13, so the version was updated
Jira: DB-12803

Test Plan: Jenkins

Reviewers: patnaik.balivada, tfoucher, tnayak

Reviewed By: patnaik.balivada

Subscribers: yql

Tags: #jenkins-ready

Differential Revision: https://phorge.dev.yugabyte.com/D38002
Assets 2
Loading