This will happen to you, probably in your first month. A test fails on the build server about once in ten runs. On your machine it passes every time. Someone re-runs the build, it goes green, and everyone moves on.
Do not move on. Here is the method.
Step 1. Make it fail for you.
You cannot fix something you cannot see. Run that one test many times: