Skip to content

Commit

Permalink
ON-45075 # Reduce sleep, remove test log output
Browse files Browse the repository at this point in the history
  • Loading branch information
kizaonline committed Nov 25, 2024
1 parent e820f83 commit beb04ce
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 17 deletions.
2 changes: 1 addition & 1 deletion OneBlink.SDK.Tests/FormsAppEnvironmentsClientTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ public async void can_clone_forms_app_environment()
}
}
);
System.Threading.Thread.Sleep(30000); // give the API time to finish cloning before deleting the clone environment
System.Threading.Thread.Sleep(5000); // give the API time to finish cloning before deleting the clone environment
await formsAppEnvironmentsClient.Delete(clonedEnvironment.id);
OneBlinkAPIException oneBlinkAPIException = await Assert.ThrowsAsync<OneBlink.SDK.OneBlinkAPIException>(() => formsAppEnvironmentsClient.Get(clonedEnvironment.id));
Assert.Equal(HttpStatusCode.NotFound, oneBlinkAPIException.StatusCode);
Expand Down
18 changes: 2 additions & 16 deletions OneBlink.SDK.Tests/FormsClientTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -140,20 +140,6 @@ public async void can_get_submission_data()
FormsClient forms = new FormsClient(ACCESS_KEY, SECRET_KEY, TenantName.ONEBLINK_TEST);
FormSubmission<object> formSubmission = await forms.GetFormSubmission<object>(this.formId, this.submissionId);
Assert.NotNull(formSubmission);
if (formSubmission.device != null)
{
foreach (PropertyInfo propertyInfo in formSubmission.device.GetType().GetProperties())
{
Console.WriteLine("Device: {0}={1}", propertyInfo.Name, propertyInfo.GetValue(formSubmission.device, null));
}
}
if (formSubmission.user != null)
{
foreach (PropertyInfo propertyInfo in formSubmission.user.GetType().GetProperties())
{
Console.WriteLine("User: {0}={1}", propertyInfo.Name, propertyInfo.GetValue(formSubmission.user, null));
}
}
}

[Fact]
Expand Down Expand Up @@ -296,7 +282,7 @@ public async void can_crud_form()
retrievedForm.description = updatedDescription;
Form updatedForm = await formsClient.Update(retrievedForm);
Assert.Equal(updatedDescription, updatedForm.description);
System.Threading.Thread.Sleep(30000); // give the API time to finish upserting s3 resources before deleting the form
System.Threading.Thread.Sleep(5000); // give the API time to finish upserting s3 resources before deleting the form
await formsClient.Delete(updatedForm.id);

var oneBlinkAPIException = await Assert.ThrowsAsync<OneBlink.SDK.OneBlinkAPIException>(() => formsClient.Get(updatedForm.id, true));
Expand Down Expand Up @@ -325,7 +311,7 @@ public async void can_create_with_defaults()
)
};
Form updatedForm = await formsClient.Update(savedForm);
System.Threading.Thread.Sleep(30000); // give the API time to finish upserting s3 resources before deleting the form
System.Threading.Thread.Sleep(5000); // give the API time to finish upserting s3 resources before deleting the form

await formsClient.Delete(updatedForm.id);
}
Expand Down

0 comments on commit beb04ce

Please sign in to comment.