Add maxwait with default value, new test