The myth that China and Russia can never be ally is something the west keep telling us. Sure, China and Russia have bad history. Sure, China and Russia have different goals. Sure, China is traditionally not comfortable with alliance. But there is nothing sure about politics and geopolitics. After all there is not permanent friend or enemy in politics. Moreover, as you said, China and Russia do face the same threat in the form of the USA today. There is no better time for China and Russia to form an alliance.
I wouldn't say Russian economy as great today, it is fine, barely survive from the sanction. Russia did a great job, with China and India help, to survive the economic sanction. Btw, Russia just asked China to loan it money, if I'm not mistaken they asked for 20 billion, but China haven't answered yet. Some Chinese banks have also pulled back from doing business with Russia because of the tightening sanction. Frankly, I think China should set up special vehicles to conduct businesses with Russia and increase the investment aggressively in Russia to replace foreign companies leaving Russia.
No doubt China has benefited some from this war, like cheaper energy import from Russia or European moving factories to China. But IMHO, those are just pennies compare to China most important project, One Belt One Road, to connect and integrate Eurasian market. Now that project suffered some setback, though I would say it is not dead yet, far from it. It is better if there is peace in Eurasia, it is good for business, and for security, as we can see with what happened in Moscow. Moscow is distracted by the war, that ISIS could found a loophole to launch attack. FSB is doing a really poor job.
As for Gaza, it could potentially destablize China and Israel relationship. Israel is under international siege, and it will force Israel to get closer to the US, and that could threaten China business interest in Israel. While at the same time, China is forced to stand up for its Palestinian/Arab allies.
It is really not easy for China to navigate this international relationship.