Don't know where you get the 6 hours from.
You need to take a test in the 72 hours prior to the scheduled departure time of your last leg with a destination in Canada. Most airports have test centers that guarantee a PCR-test result in 24h, 12h, etc. The shorter the processing time, the higher the cost for the test.