Issue #20556: Used specific assert methods in threading tests.