How to end a test after scoreboard compare

In reply to ak_verifsj:

My test terminates after last transaction is applied to DUT, through phase.drop_objection. Simulation ends before the scoreboard could compare the data. I tried to add delay before phase.drop_objection(), which allowed scoreboard to compare data.
Is there a cleaner/automatic way to drop the objection/end the simulation after comparing the data?

You can refer the EndOfTest mechanism in here: End of Test | UVM Cookbook