The Obama administration worked out a similar deal with China, and it worked. At least as far as the people who track these sorts of things can tell, Chinese hacking activity against US corporations dropped precipitously. However, I  have heard it is on the rise again, suggesting that they might consider the deal to have ended with the presidency that negotiated it.

More concretely, China is trying to improve trade ties, and has a lot more to gain than to lose by upholding this agreement. They can't gain access to the Canadian resource sector by hacking it, but our government *can* shut them out over that kind of behavior. Why would they even make the deal if they intended to break it? They would gain nothing and lose credibility.