Skip to content

Commit

Permalink
test: use unique measurement type to prevent side effects across test…
Browse files Browse the repository at this point in the history
… instances
  • Loading branch information
reubenmiller committed Apr 5, 2024
1 parent 24e727d commit d6dd0a7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test/c8y_test/measurement_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@ func TestMeasurementService_DeleteMeasurements(t *testing.T) {
testDevice, err := createRandomTestDevice()
testingutils.Ok(t, err)

valueFragmentType := "nx_Type1"
valueFragmentType := "nx_Type1_" + testingutils.RandomString(5)
createMeasVariable1 := measurementFactory(client, testDevice.ID, valueFragmentType, "Variable1")
createMeasVariable2 := measurementFactory(client, testDevice.ID, valueFragmentType, "Variable2")

Expand Down Expand Up @@ -422,6 +422,7 @@ func TestMeasurementService_DeleteMeasurements(t *testing.T) {
// Check that the measurements have been removed
// Check by requesting the new collection again as retrieving single measurements
// is no longer supported by Cumulocity IoT
time.Sleep(2 * time.Second) // give server some time to delete the measurements
measColAfter, resp, err := client.Measurement.GetMeasurements(
context.Background(),
searchOptions,
Expand Down

0 comments on commit d6dd0a7

Please sign in to comment.