@@ -76,7 +76,7 @@ func createTestAgent(psc pb.ProfilerServiceClient) *agent {
7676 client : psc ,
7777 deployment : createTestDeployment (),
7878 profileLabels : map [string ]string {instanceLabel : testInstance },
79- profileTypes : []pb.ProfileType {pb .ProfileType_CPU , pb .ProfileType_HEAP , pb .ProfileType_THREADS },
79+ profileTypes : []pb.ProfileType {pb .ProfileType_CPU , pb .ProfileType_HEAP , pb .ProfileType_HEAP_ALLOC , pb . ProfileType_THREADS },
8080 }
8181}
8282
@@ -140,11 +140,12 @@ func TestProfileAndUpload(t *testing.T) {
140140 errFunc := func (io.Writer ) error { return errors .New ("" ) }
141141 testDuration := time .Second * 5
142142 tests := []struct {
143- profileType pb.ProfileType
144- duration * time.Duration
145- startCPUProfileFunc func (io.Writer ) error
146- writeHeapProfileFunc func (io.Writer ) error
147- wantBytes []byte
143+ profileType pb.ProfileType
144+ duration * time.Duration
145+ startCPUProfileFunc func (io.Writer ) error
146+ writeHeapProfileFunc func (io.Writer ) error
147+ deltaMutexProfileFunc func (io.Writer ) error
148+ wantBytes []byte
148149 }{
149150 {
150151 profileType : pb .ProfileType_CPU ,
@@ -218,6 +219,10 @@ func TestProfileAndUpload(t *testing.T) {
218219 return nil
219220 },
220221 },
222+ {
223+ profileType : pb .ProfileType_CONTENTION ,
224+ deltaMutexProfileFunc : errFunc ,
225+ },
221226 }
222227
223228 for _ , tt := range tests {
0 commit comments