Military alliance is a doctrine of cold war, a ramification of confrontation between US and Soviet Union. When you talk about military alliance, this delivers a strong message of confrontation.
China has a defense pack with North Korea which will expire in 2021, as per Kim's announcement of "Great Achievement of Nuclear weapon", I highly doubt China will renew this defense pack with North Korea after 2021. From a strategic view, China is pushing OBOR global wise, the concept of alliance is intrinsically against this great initiative, OBOR promote cooperation, howerver alliance promote confrontation.
Pakistanis a top 10 military power, the 7th nuclear power, a leading Muslim military force, itself is a semi-polar force. Pakistan apparently opt to the relationship of being a partner, because India is the only arch-rival of Pakistan. Pakistan became alliance of US because India's pro USSR policy. However after Pakistan and India became nuclear power, they in fact respectively turn into independent military force.
As per Chinese ambassador's statement, "Pakistan and China are good friends, not alliance, alliance is the doctrine of cold war." Pakistan can definitely obtain support from China, a time-tested friend, when its existence is threaten, this not necessarily lead to a signed defense pack which unavoidably escalate the collision of South Asia, all are losers if this happen.
I don't think China, Pakistan, India have requirement to formally sign military defense pack with any country.