From 94aacc2ef1e4f1339eb0fa230cea29eea3d5fa13 Mon Sep 17 00:00:00 2001 From: fwang12 Date: Mon, 5 Apr 2021 20:01:59 +0800 Subject: [PATCH] [KYUUBI #485] [KYUUBI #479][TEST][FOLLOWUP] Set FRONTEND_BIND_HOST to 127.0.0.1 for all suites ![turboFei](https://badgen.net/badge/Hello/turboFei/green) [![Closes #485](https://badgen.net/badge/Preview/Closes%20%23485/blue)](https://github.com/yaooqinn/kyuubi/pull/485) ![2](https://badgen.net/badge/%2B/2/red) ![1](https://badgen.net/badge/-/1/green) ![1](https://badgen.net/badge/commits/1/yellow) ![Test Plan](https://badgen.net/badge/Missing/Test%20Plan/ff0000) [Powered by Pull Request Badge](https://pullrequestbadge.com/?utm_medium=github&utm_source=yaooqinn&utm_campaign=badge_info) ### _Why are the changes needed?_ Set FRONTEND_BIND_HOST to 127.0.0.1 for all suites ### _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 - [ ] [Run test](https://kyuubi.readthedocs.io/en/latest/tools/testing.html#running-tests) locally before make a pull request Closes #485 from turboFei/KYUUBI_479_followup. Closes #485 Closes #479 44dc28f [fwang12] [KYUUBI #479][TEST][FOLLOWUP] Set FRONTEND_BIND_HOST to 127.0.0.1 for all suites Authored-by: fwang12 Signed-off-by: Kent Yao --- .../src/test/scala/org/apache/kyuubi/KyuubiFunSuite.scala | 2 ++ .../scala/org/apache/kyuubi/service/FrontendServiceSuite.scala | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/kyuubi-common/src/test/scala/org/apache/kyuubi/KyuubiFunSuite.scala b/kyuubi-common/src/test/scala/org/apache/kyuubi/KyuubiFunSuite.scala index 58d28c88c..a9cab5f6a 100644 --- a/kyuubi-common/src/test/scala/org/apache/kyuubi/KyuubiFunSuite.scala +++ b/kyuubi-common/src/test/scala/org/apache/kyuubi/KyuubiFunSuite.scala @@ -25,6 +25,7 @@ import org.apache.log4j.spi.LoggingEvent import org.scalatest.{BeforeAndAfterAll, BeforeAndAfterEach, FunSuite, Outcome} import org.scalatest.concurrent.Eventually +import org.apache.kyuubi.config.KyuubiConf import org.apache.kyuubi.config.internal.Tests.IS_TESTING trait KyuubiFunSuite extends FunSuite @@ -36,6 +37,7 @@ trait KyuubiFunSuite extends FunSuite // scalastyle:on override def beforeAll(): Unit = { System.setProperty(IS_TESTING.key, "true") + System.setProperty(KyuubiConf.FRONTEND_BIND_HOST.key, "127.0.0.1") doThreadPostAudit() super.beforeAll() } diff --git a/kyuubi-common/src/test/scala/org/apache/kyuubi/service/FrontendServiceSuite.scala b/kyuubi-common/src/test/scala/org/apache/kyuubi/service/FrontendServiceSuite.scala index 8b7be9f68..fa243eb7e 100644 --- a/kyuubi-common/src/test/scala/org/apache/kyuubi/service/FrontendServiceSuite.scala +++ b/kyuubi-common/src/test/scala/org/apache/kyuubi/service/FrontendServiceSuite.scala @@ -37,7 +37,6 @@ class FrontendServiceSuite extends KyuubiFunSuite { protected val server = new NoopServer() protected val conf = KyuubiConf() - .set(KyuubiConf.FRONTEND_BIND_HOST, "127.0.0.1") .set(KyuubiConf.FRONTEND_BIND_PORT, 0) .set("kyuubi.test.server.should.fail", "false")