{"action":"closed","issue":{"url":"https://api.github.com/repos/Microsoft/vsts-tasks/issues/7457","repository_url":"https://api.github.com/repos/Microsoft/vsts-tasks","labels_url":"https://api.github.com/repos/Microsoft/vsts-tasks/issues/7457/labels{/name}","comments_url":"https://api.github.com/repos/Microsoft/vsts-tasks/issues/7457/comments","events_url":"https://api.github.com/repos/Microsoft/vsts-tasks/issues/7457/events","html_url":"https://github.com/Microsoft/vsts-tasks/issues/7457","id":332028595,"node_id":"MDU6SXNzdWUzMzIwMjg1OTU=","number":7457,"title":"Updating VSTest task to v2 causes elasticsearch tests to fail","user":{"login":"roizentner","id":24566282,"node_id":"MDQ6VXNlcjI0NTY2Mjgy","avatar_url":"https://avatars0.githubusercontent.com/u/24566282?v=4","gravatar_id":"","url":"https://api.github.com/users/roizentner","html_url":"https://github.com/roizentner","followers_url":"https://api.github.com/users/roizentner/followers","following_url":"https://api.github.com/users/roizentner/following{/other_user}","gists_url":"https://api.github.com/users/roizentner/gists{/gist_id}","starred_url":"https://api.github.com/users/roizentner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/roizentner/subscriptions","organizations_url":"https://api.github.com/users/roizentner/orgs","repos_url":"https://api.github.com/users/roizentner/repos","events_url":"https://api.github.com/users/roizentner/events{/privacy}","received_events_url":"https://api.github.com/users/roizentner/received_events","type":"User","site_admin":false},"labels":[{"id":391088422,"node_id":"MDU6TGFiZWwzOTEwODg0MjI=","url":"https://api.github.com/repos/Microsoft/vsts-tasks/labels/Area:%20Test","name":"Area: Test","color":"b60205","default":false}],"state":"closed","locked":false,"assignee":{"login":"ShreyasRmsft","id":25194518,"node_id":"MDQ6VXNlcjI1MTk0NTE4","avatar_url":"https://avatars1.githubusercontent.com/u/25194518?v=4","gravatar_id":"","url":"https://api.github.com/users/ShreyasRmsft","html_url":"https://github.com/ShreyasRmsft","followers_url":"https://api.github.com/users/ShreyasRmsft/followers","following_url":"https://api.github.com/users/ShreyasRmsft/following{/other_user}","gists_url":"https://api.github.com/users/ShreyasRmsft/gists{/gist_id}","starred_url":"https://api.github.com/users/ShreyasRmsft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ShreyasRmsft/subscriptions","organizations_url":"https://api.github.com/users/ShreyasRmsft/orgs","repos_url":"https://api.github.com/users/ShreyasRmsft/repos","events_url":"https://api.github.com/users/ShreyasRmsft/events{/privacy}","received_events_url":"https://api.github.com/users/ShreyasRmsft/received_events","type":"User","site_admin":false},"assignees":[{"login":"ShreyasRmsft","id":25194518,"node_id":"MDQ6VXNlcjI1MTk0NTE4","avatar_url":"https://avatars1.githubusercontent.com/u/25194518?v=4","gravatar_id":"","url":"https://api.github.com/users/ShreyasRmsft","html_url":"https://github.com/ShreyasRmsft","followers_url":"https://api.github.com/users/ShreyasRmsft/followers","following_url":"https://api.github.com/users/ShreyasRmsft/following{/other_user}","gists_url":"https://api.github.com/users/ShreyasRmsft/gists{/gist_id}","starred_url":"https://api.github.com/users/ShreyasRmsft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ShreyasRmsft/subscriptions","organizations_url":"https://api.github.com/users/ShreyasRmsft/orgs","repos_url":"https://api.github.com/users/ShreyasRmsft/repos","events_url":"https://api.github.com/users/ShreyasRmsft/events{/privacy}","received_events_url":"https://api.github.com/users/ShreyasRmsft/received_events","type":"User","site_admin":false}],"milestone":null,"comments":3,"created_at":"2018-06-13T14:46:05Z","updated_at":"2018-06-18T05:37:44Z","closed_at":"2018-06-18T05:37:43Z","author_association":"NONE","body":"## Environment\r\n- Server - VSTS\r\n- Agent - Private\r\n- Agent OS: Windows\r\n- Agent version: 2.134.2\r\n\r\n## Issue Description\r\nHi,\r\nI've been going through my old build definitions, updating the VSTest task from v1 to v2.\r\nEverything was going great until I updated a task that runs Elasticsearch tests.\r\nThe failing tests include the use of https://github.com/poulfoged/Elasticsearch-Inside\r\nAll the tests which involve Elasticsearch Aggregations fail, whereas other Elasticsearch tests succeed.\r\n\r\nI can't seem to understand why updating the VSTest task version causes this behavior.\r\n\r\nHere's the code snippet which causes the failure:\r\n```c#\r\nIExpressionBuilder expressionBuilder = mExpressionFactory.CreateBuilder(scope);\r\n           ISearchResponse<ElasticItem> response = await ReadClient\r\n                .SearchAsync<ElasticItem>(s => s\r\n                    .Source(false)\r\n                    .Size(0)\r\n                    .Query(q => q\r\n                        .Bool(b => b\r\n                            .Filter(bf => bf\r\n                                .DateRange(dr => dr\r\n                                    .Field(f => f.StartTime)\r\n                                    .GreaterThanOrEquals(range.Item1)\r\n                                    .LessThanOrEquals(range.Item2)))))\r\n                    .Aggregations(a => a\r\n                        .DateHistogram(INTERVALS, t => t\r\n                            .Field(i => i.StartTime)\r\n                            .Interval((DateInterval)interval)\r\n                            .ExtendedBounds(range.Item1, range.Item2)\r\n                            .Aggregations(ia => ia\r\n                                .Sum(SUM1, ms => ms.Field(expressionBuilder.Sum1Expression))\r\n                                .Sum(SUM2, ms => ms.Field(expressionBuilder.Sum2Expression)))))\r\n                ).ConfigureAwait(false);\r\n```\r\n\r\n### Error logs\r\nTest method ElasticSearch.Tests.GetRange_RootYearInterval_ValidResult threw exception: \r\nElasticsearch.Net.UnexpectedElasticsearchClientException: Collection is read-only. ---> System.NotSupportedException: Collection is read-only."}}
{"actor":{"display_login":"ShreyasRmsft"}}