def METHOD_NAME(testNode, testNodeArgs):
    """Test --terminate-at-block stops at the correct block."""
    Print(" ".join([
        "The test node has begun receiving from the producing node and",
        "is expected to stop at the block number specified here: ",
        testNodeArgs
    ]))
    # Read block information from the test node as it runs.
    head, lib = getBlockNumInfo(testNode)
    Print("Test node head = {}, lib = {}.".format(head, lib))
    if "irreversible" in testNodeArgs:
        checkIrreversible(head, lib)
    else:
        checkHeadOrSpeculative(head, lib)
    # Check for the terminate at block message.
    match = re.search(r"--terminate-at-block (\d+)", testNodeArgs)
    termAtBlock = int(match.group(1))
    assert head == termAtBlock, f"head {head} termAtBlock {termAtBlock}"