He had to have known Snape was going to betray him.
Also, that would explain the "new lessons" he was teaching Harry this year. It's not like his "guesses and speculation" were new. Dumbledore had his assumptions all long, why this year would he go in to so much detail and trouble to make Harry learn everything he could?
This left book 7 totally up in the air. How different is it going to be without Hogwarts?