Fix race condition NPE in medium tests (#2148940)

Change-Id: I53a5fcb7eb4889da2cefa0fdc9092e44e57a2741
1 file changed