internal: refactor TestCondition to care about errors
internal: refactor TestCondition to care about errors

Change-Id: I7ef26b8b0b945dea022d2674b2a59060137292e8
Reviewed-on: https://code-review.googlesource.com/c/36170
Reviewed-by: kokoro <2ac7b1f3fa578934c95181d4272be0d3bca00121@google.com>
Reviewed-by: Eno Compton <ad9228447a2ef39a5712f4b80b45071fa843fa0d@google.com>

googleapis/google-cloud-go,googleapis/google-cloud-go,googleapis/google-cloud-go,googleapis/google-cloud-go