[nobug] correct failing tests in master/3.6(cherry picked from commit f66ff3e0ff2e4c102a0b9c10cf10d737ac1dca31)