@@ -100,6 +100,7 @@ func handleGetCloud(w http.ResponseWriter, req *http.Request) {
100100}
101101
102102func TestEmptyAIKey (t * testing.T ) {
103+ t .Parallel ()
103104 var err error
104105
105106 _ , err = NewAITelemetry (httpURL , "" , aiConfig )
@@ -114,6 +115,7 @@ func TestEmptyAIKey(t *testing.T) {
114115}
115116
116117func TestNewAITelemetry (t * testing.T ) {
118+ t .Parallel ()
117119 var err error
118120
119121 th1 , err := NewAITelemetry (httpURL , "00ca2a73-c8d6-4929-a0c2-cf84545ec225" , aiConfig )
@@ -128,6 +130,7 @@ func TestNewAITelemetry(t *testing.T) {
128130}
129131
130132func TestTrackMetric (t * testing.T ) {
133+ t .Parallel ()
131134 metric := Metric {
132135 Name : "test" ,
133136 Value : 1.0 ,
@@ -140,6 +143,7 @@ func TestTrackMetric(t *testing.T) {
140143}
141144
142145func TestTrackLog (t * testing.T ) {
146+ t .Parallel ()
143147 report := Report {
144148 Message : "test" ,
145149 Context : "10a" ,
@@ -152,6 +156,7 @@ func TestTrackLog(t *testing.T) {
152156}
153157
154158func TestTrackEvent (t * testing.T ) {
159+ t .Parallel ()
155160 event := Event {
156161 EventName : "testEvent" ,
157162 ResourceID : "SomeResourceId" ,
@@ -165,20 +170,23 @@ func TestTrackEvent(t *testing.T) {
165170}
166171
167172func TestFlush (t * testing.T ) {
173+ t .Parallel ()
168174 th1 .Flush ()
169175 th2 .Flush ()
170176}
171177
172178func TestClose (t * testing.T ) {
179+ t .Parallel ()
173180 th1 .Close (10 )
174181 th2 .Close (10 )
175182}
176183
177184func TestClosewithoutSend (t * testing.T ) {
185+ t .Parallel ()
178186 var err error
179187
180- thtest , err := NewAITelemetry (httpURL , "00ca2a73-c8d6-4929-a0c2-cf84545ec225" , aiConfig )
181- if thtest == nil {
188+ thtest1 , err := NewAITelemetry (httpURL , "00ca2a73-c8d6-4929-a0c2-cf84545ec225" , aiConfig )
189+ if thtest1 == nil {
182190 t .Errorf ("Error initializing AI telemetry:%v" , err )
183191 }
184192
@@ -187,6 +195,6 @@ func TestClosewithoutSend(t *testing.T) {
187195 t .Errorf ("Error initializing AI telemetry with connection string:%v" , err )
188196 }
189197
190- thtest .Close (10 )
198+ thtest1 .Close (10 )
191199 thtest2 .Close (10 )
192200}
0 commit comments