Al-Hasan (may Allah have mercy on him) said that the testimony of a slave and of a dhimmi is rejected; but if the slave is freed and the dhimmi accepts Islam, then their testimony is permissible.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الشهادات / 21183