Github user srowen commented on a diff in the pull request:
https://github.com/apache/spark/pull/23030#discussion_r233887452
--- Diff:
resource-managers/yarn/src/test/scala/org/apache/spark/deploy/yarn/YarnAllocatorSuite.scala
---
@@ -378,14 +380,16 @@ class YarnAllocatorSuite extends SparkFunSuite with
Matchers with BeforeAndAfter
}
test("memory exceeded diagnostic regexes") {
- val diagnostics =
- "Container
[pid=12465,containerID=container_1412887393566_0003_01_000002] is running " +
- "beyond physical memory limits. Current usage: 2.1 MB of 2 GB
physical memory used; " +
- "5.8 GB of 4.2 GB virtual memory used. Killing container."
- val vmemMsg = memLimitExceededLogMessage(diagnostics,
VMEM_EXCEEDED_PATTERN)
- val pmemMsg = memLimitExceededLogMessage(diagnostics,
PMEM_EXCEEDED_PATTERN)
- assert(vmemMsg.contains("5.8 GB of 4.2 GB virtual memory used."))
- assert(pmemMsg.contains("2.1 MB of 2 GB physical memory used."))
+ def logMessage(pattern: Pattern): String = {
--- End diff --
I don't feel strongly about it, but I could just remove this test too, and
inline the regexes to simplify this. This was just testing the exact error
message and I don't know how useful that is.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]