Michael Burgess hit a career-best 98 as Sri Lanka’s bowlers struggled on day two against Leicestershire.
Dasun Shanaka, 91 overnight, reached his century off 122 balls before he was caught off Tom Wells as Sri Lanka were bowled out for 367.
The hosts began brightly with captain Angus Robson and Lewis Hill sharing a 71-run opening stand before both fell to left-arm spinner Rangana Herath.
Solid contributions from all of the Foxes batsmen saw them close on 304-5.
Wicketkeeper Burgess, who has played only six first-class matches, missed out on a maiden hundred when he was caught and bowled by Milinda Siriwardana.
He hit 13 fours as he surpassed his previous highest score of 51.
Sri Lanka begin their two-Test series against England at Headingley on Thursday.