You can use the nonce and transaction count to validate if the nonce was mined.
if (tx.nonce >=< getTransactionCount(sender)) {
drop transaction
}
I don't think this situation is particular to testnets. I'd say it is worse in mainnet where short chain reorgs are common.