One thing we need to keep in mind while China is responding to the current crisis is that an event like N. Korean nuclear test affects power struggle inside Chinese leadership. China no longer has monolithic leader like Deng Xiao-ping or Mao Zedong who towers over everybody else. It is ruled by collective leadership made up of multiple factions, in which Hu Jintao has a little more power than other Politburo members. Everytime something like this happens, some factions are on the offensive, and others are put on the defensive.
The nuclear test is a drastic event which could visibly shift power balance inside Politburo, not just temporary jostling among factions. Lately, Chinese media are wide-open to criticize N. Korea. I think that some folks on the top let this floodgate open to get at their political enemies.
High stake's game is being played not only in Pyongyang but also in Beijing.
Exactly. "China" is not the same as "North Korea", in that there's not one guy at the top looking down at the chessboard, and moving pieces at whim. China top leadership has become a lot more like the U.S. Congress, where everyone has a chess piece, and must work together to get things done. As the situation changes, the pieces will alter their tactics from offensive to defensive. Some situations will force moves that the players don't want, but they'll generally come to a consensus on how to get around problems.
The current Chinese system is an arcane and inflexible way to govern, but it's far less arbitrary than the days of the revolutionary leaders.