Boyfriends Ex is pregnant

So I just started dating this guy, it was a dream. He is amazing and perfect. He just recently split up with his ex, and she just let him know she is pregnant the other day. This was previous relationship to me and him being together. So I can’t really be mad at him.

He says maybe It isn’t his and he wants to get a DNA test done. I just don’t know what to do. He doesn’t want to be with her and he is begging for me not to leave him. Any advice? I’m in shock.