Test involving thread spawning failed in GitHub Actions

I have found the cause. It was because when the test was running via GitHub Actions, readline() from stdin worked differently as in a shell environment.