kyuubi/kubernetes
Cheng Pan 6539731417
[KYUUBI #1287] [TEST] Refacotor test hierarchical
<!--
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/apache/incubator-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.
-->
Change the name to reflect functionalities, restore `SparkQueryTests` both on Engine&Server sides

Rename `JDBCTestUtils` to `HiveJDBCTestHelper`
Rename `BasicJDBCTests` to `SparkMetadataTests`
Rename `HiveJDBCTests` to `HiveMetadataTests`
Rename `BasicDeltaJDBCTests` to `DeltaMetadataTests`
Rename `BasicHudiJDBCTests` to `HudiMetadataTests`
Rename `BasicIcebergJDBCTests` to `IcebergMetadataTests`
Rename `KyuubiOperationGroupSuite` to `KyuubiOperationPerGroupSuite`

Rename sorts of `spark` prefixed fields in `HiveJDBCTestHelper`

Use `UserGroupInformation.createUserForTesting` for `KyuubiOperationPerGroupSuite`

Hierarchical

```
- HiveJDBCTestHelper
    - DeltaMetadataTests
        - [ENGINE] SparkDeltaOperationSuite
        - [SERVER] DeltaOperationSuite
    - HudiMetadataTests
        - [ENGINE] SparkHudiOperationSuite
        - [SERVER] HudiOperationSuite
    - IcebergMetadataTests
        - [ENGINE] SparkIcebergOperationSuite
        - [SERVER] IcebergOperationSuite
    - SparkMetadataTests
        - [SERVER] KyuubiJdbcDriverHASuite
        - HiveMetadataTests
            - [ENGINE] SparkOperationSuite mixin SparkQueryTests
            - [SERVER] KyuubiOperationHiveCatalogSuite
    - SparkQueryTests
        - [ENGINE] SparkOperationSuite mixin HiveMetadataTests
        - [SERVER] KubernetesJDBCTestsSuite
        - [SERVER] KyuubiOperationPerServerSuite
        - [SERVER] KyuubiOperationPerGroupSuite
        - [SERVER] KyuubiOperationPerUserSuite
        - [SERVER] KyuubiOperationYarnClusterSuite
    ... other Suites for specific cases
```

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

Closes #1287 from pan3793/ut.

Closes #1287

d9a410ca [Cheng Pan] Fix K8s tests
478a60dc [Cheng Pan] Fix scalastyle
91f2a27b [Cheng Pan] Rename BasicQueryTests to SparkQueryTests
40154223 [Cheng Pan] Rename JDBCTestHelper to HiveJDBCTestHelper
efb99110 [Cheng Pan] Use UGI createUserForTesting
d82b0635 [Cheng Pan] Reset UGI
11927101 [Cheng Pan] Refresh group mappings after update Hadoop conf
b21f36e7 [Cheng Pan] Restore lazy val user
25008ad3 [Cheng Pan] Rename `KyuubiOperationGroupSuite` to `KyuubiOperationPerGroupSuite`
d71c7e1b [Cheng Pan] Refacotor test hierarchical

Authored-by: Cheng Pan <chengpan@apache.org>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2021-10-27 19:14:13 +08:00
..
integration-tests [KYUUBI #1287] [TEST] Refacotor test hierarchical 2021-10-27 19:14:13 +08:00