This doesn't always work unfortunately especially when two groups have different political and social needs. I would add on to this that resources must be a) abundant and b)equally shared such that access to resources isn't asymmetric in favor of either the more powerful entity or the lesser powerful entity.
I live in Jordan. It's about three percent Christian and the rest are Sunni Muslim. Generally relations are good but there can be some fears among Christians as well as spite among Muslims since Christians are generally the most educated here.
Sadly if Christianity represented more than 3 percent there might be severe problems like in Syria or Lebanon. The Muslims prefer to dominate their environments and will see it as a threat if Christianity grew here.