Merge "veyron/runtimes/google/ipc: Fix a race in the test."
diff --git a/runtimes/google/ipc/full_test.go b/runtimes/google/ipc/full_test.go
index ae21b63..266f3c1 100644
--- a/runtimes/google/ipc/full_test.go
+++ b/runtimes/google/ipc/full_test.go
@@ -1436,11 +1436,14 @@
 }
 
 type mockDischarger struct {
+	mu     sync.Mutex
 	called bool
 }
 
 func (m *mockDischarger) Discharge(ctx ipc.ServerContext, caveatAny vdlutil.Any, _ security.DischargeImpetus) (vdlutil.Any, error) {
+	m.mu.Lock()
 	m.called = true
+	m.mu.Unlock()
 	caveat, ok := caveatAny.(security.ThirdPartyCaveat)
 	if !ok {
 		return nil, fmt.Errorf("type %T does not implement security.ThirdPartyCaveat", caveatAny)