Xi has known this for some time but no doubt holding out as long as he could....we knew this would be a testing time for China...and China knew it too...they simply played it as far as they dared to go without seriously hurting their own endeavors. However....it's far from being over regarding N.Korea.
The good thing is Trump has gotten the Chinese to signal that, as long as it’s provoked, they will not be foolish enough to interfere if we are forced to use force on North Korea. So, to the extent the Chinese are not able to control Kim, they’ve given us their tacit approval to take him out.