Maybe he was testing Luke's reaction to such a brush off...
To ascertain how determined to stick to it he was...
The Shaolin monks would make you wait for days/weeks outside their temple proving your enthusiasm/respect for the training(Like in 'Fight club'😉,
Yoda was still probably testing Luke in this kind of way,
still requiring further verification from Obi-Wan on the subject,
and Yoda's stance on training Luke probably changed after he saw that it was train him or train Leia.... as this was the best possible way of getting Palps the hell out of there.. Especially after years of meditation on it and possibly consulting Qui-Gonn for all this time/ and or realising fully Luke's connection in the Anakin/Prophecy....