[KYUUBI #554] [TEST] Remove deprecated FunSuite

<!--
Thanks for sending a pull request!

Here are some tips for you:
  1. If this is your first time, please read our contributor guidelines: https://kyuubi.readthedocs.io/en/latest/community/contributions.html
  2. If the PR is related to an issue in https://github.com/NetEase/kyuubi/issues, add '[KYUUBI #XXXX]' in your PR title, e.g., '[KYUUBI #XXXX] Your PR title ...'.
  3. If the PR is unfinished, add '[WIP]' in your PR title, e.g., '[WIP][KYUUBI #XXXX] Your PR title ...'.
-->

### _Why are the changes needed?_
<!--
Please clarify why the changes are needed. For instance,
  1. If you add a feature, you can talk about the use case of it.
  2. If you fix a bug, you can clarify why it is a bug.
-->

### _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/latest/tools/testing.html#running-tests) locally before make a pull request

Closes #554 from pan3793/scalatest.

Closes #554

4c94224 [Cheng Pan] update scalastyle conf
f29a3e6 [Cheng Pan] [TEST] Remove deprecated FunSuite

Authored-by: Cheng Pan <379377944@qq.com>
Signed-off-by: fwang12 <fwang12@ebay.com>
This commit is contained in:
Cheng Pan 2021-04-21 21:00:33 +08:00 committed by fwang12
parent c0aaeb362d
commit 6431dcc25b
2 changed files with 9 additions and 2 deletions

View File

@ -22,13 +22,14 @@ import scala.collection.mutable.ArrayBuffer
// scalastyle:off
import org.apache.log4j.{Appender, AppenderSkeleton, Level, Logger}
import org.apache.log4j.spi.LoggingEvent
import org.scalatest.{BeforeAndAfterAll, BeforeAndAfterEach, FunSuite, Outcome}
import org.scalatest.{BeforeAndAfterAll, BeforeAndAfterEach, Outcome}
import org.scalatest.concurrent.Eventually
import org.scalatest.funsuite.AnyFunSuite
import org.apache.kyuubi.config.KyuubiConf
import org.apache.kyuubi.config.internal.Tests.IS_TESTING
trait KyuubiFunSuite extends FunSuite
trait KyuubiFunSuite extends AnyFunSuite
with BeforeAndAfterAll
with BeforeAndAfterEach
with Eventually

View File

@ -135,11 +135,17 @@ This file is divided into 3 sections:
<!-- ??? usually shouldn't be checked into the code base. -->
<check level="error" class="org.scalastyle.scalariform.NotImplementedErrorUsage" enabled="true"/>
// remove this after upgrade to scalatest 3.2.x
<check customId="funsuite" level="error" class="org.scalastyle.scalariform.TokenChecker" enabled="true">
<parameters><parameter name="regex">^FunSuite[A-Za-z]*$</parameter></parameters>
<customMessage>Tests must extend org.apache.kyuubi.KyuubiFunSuite instead.</customMessage>
</check>
<check customId="anyfunsuite" level="error" class="org.scalastyle.scalariform.TokenChecker" enabled="true">
<parameters><parameter name="regex">^AnyFunSuite[A-Za-z]*$</parameter></parameters>
<customMessage>Tests must extend org.apache.kyuubi.KyuubiFunSuite instead.</customMessage>
</check>
<check customId="println" level="error" class="org.scalastyle.scalariform.TokenChecker" enabled="true">
<parameters><parameter name="regex">^println$</parameter></parameters>
<customMessage><![CDATA[Are you sure you want to println? If yes, wrap the code block with