kyuubi/kyuubi-server
liangbowen bbf855df0e
[KYUUBI #4912] [TEST] Replace Scala's assert in tests with Scalatest's for prettified error message
### _Why are the changes needed?_

- replacing callings to Scala's assert method by Scalatest's `Assertions.assert`
- While Scala's assert method just throws a simple Java's Assertion Error ,
```
  def assert(assertion: Boolean) {
    if (!assertion)
      throw new java.lang.AssertionError("assertion failed")
  }
```
the Scalatest's `Assertions.assert` prettifies the error message, eg.,
`assert(a == b || c >= d) // Error message: 1 did not equal 2, and 3 was not greater than or equal to 4`

### _How was this patch tested?_
- [ ] Add some test cases that check the changes thoroughly including negative and positive cases if possible

- [ ] Add screenshots for manual tests if appropriate

- [x] [Run test](https://kyuubi.readthedocs.io/en/master/develop_tools/testing.html#running-tests) locally before make a pull request

Closes #4912 from bowenliang123/scalatest-assert.

Closes #4912

e1d2ce3e0 [liangbowen] use Scalatest's assert for better error message

Authored-by: liangbowen <liangbowen@gf.com.cn>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2023-06-01 11:52:56 +08:00
..
src [KYUUBI #4912] [TEST] Replace Scala's assert in tests with Scalatest's for prettified error message 2023-06-01 11:52:56 +08:00
web-ui [KYUUBI #4783] Use pnpm v8 and update pnpm lockfile to v6 schema 2023-05-03 18:39:22 +08:00
pom.xml [KYUUBI #4894] Bump Mockito from 4.9.0 to 4.11.0 and ScalaTest from 3.2.15 to 3.2.16 2023-05-29 11:15:31 +08:00