public async Task <IHttpActionResult> ActorsFull(int iterations = 10) { if (_testState == null) { return(BadRequest("Test state was not initialized. Call the /api/tests/setup endpoint first.")); } var newNames = Enumerable.Range(0, iterations) .Select(_ => Enumerable.Range(0, _testState.Count) .Select(__ => RandomString(NameLength)).ToImmutableArray()) .ToImmutableArray(); var tests = new ServiceFabricActorsTests(_testState); var init = await tests.Initialize().ConfigureAwait(false); var queryNames = await tests.QueryNames(iterations, " ").ConfigureAwait(false); var queryPets = await tests.QueryPetNames(iterations).ConfigureAwait(false); var queryFriends = await tests.QueryFriendNames(iterations, 3, " ").ConfigureAwait(false); var updateNames = await tests.UpdateNames(iterations, newNames).ConfigureAwait(false); return(Ok(new { init, queryNames, queryPets, queryFriends, updateNames })); }
public async Task <IHttpActionResult> QueryActorsFriends(int iterations, int depth = 3, string separator = ", ") { if (_testState == null) { return(BadRequest("Test state was not initialized. Call the /api/tests/setup endpoint first.")); } var test = new ServiceFabricActorsTests(_testState); return(Ok(await test.QueryFriendNames(iterations, depth, separator).ConfigureAwait(false))); }