The TaskManager's CPU load magic may fail when JMX providers are overwritten.
The TaskManager logic checks if the class com.sun.management.OperatingSystemMXBean is available. If yes, it assumes that the ManagementFactory.getOperatingSystemMXBean() is of that type. That is not necessarily the case.
This is visible in the Cassandra tests, as Cassandra overrides the JMX provider - every heartbeat causes an exception that is logged (See below), flooding the log, killing the heartbeat message.
I would also suggest to move the entire metrics code out of the TaskManager class into a dedicated class TaskManagerJvmMetrics. That one can, with a static method, install the metrics into the TaskManager's metric group.
Sample stack trace when default platform beans are overridden: