Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
rm one unit test
  • Loading branch information
yaooqinn committed Jan 4, 2018
commit fea2490027c611fb9be61ea33ad4de962ccf2ffa
Original file line number Diff line number Diff line change
Expand Up @@ -48,22 +48,6 @@ class HiveUtilsSuite extends QueryTest with SQLTestUtils with TestHiveSingleton
}
}

test("ChildFirstURLClassLoader's parent is null") {
val conf = new SparkConf
val contextClassLoader = Thread.currentThread().getContextClassLoader
val loader = new FakeChildFirstURLClassLoader(Array(), contextClassLoader)
try {
Thread.currentThread().setContextClassLoader(loader)
intercept[IllegalArgumentException](
HiveUtils.newClientForMetadata(
conf,
SparkHadoopUtil.newConfiguration(conf),
HiveUtils.newTemporaryConfiguration(useInMemoryDerby = true)))
} finally {
Thread.currentThread().setContextClassLoader(contextClassLoader)
}
}

test("ChildFirstURLClassLoader's parent is null, get spark classloader instead") {
val conf = new SparkConf
val contextClassLoader = Thread.currentThread().getContextClassLoader
Expand All @@ -79,9 +63,3 @@ class HiveUtilsSuite extends QueryTest with SQLTestUtils with TestHiveSingleton
}
}
}

/**
* A Fake [[ChildFirstURLClassLoader]] used for test
*/
private[spark] class FakeChildFirstURLClassLoader(urls: Array[URL], parent: ClassLoader)
extends MutableURLClassLoader(urls, null)