From afb56ed83b41ef6e3922aaaa507e9810de635f27 Mon Sep 17 00:00:00 2001 From: snrnats Date: Mon, 19 Feb 2018 19:16:21 +0300 Subject: [PATCH 01/46] Unwrap AggregateException on calling Task.Wait() method --- ...crosoft.AppCenter.Windows.Shared.projitems | 1 + .../Storage/Storage.cs | 11 +++--- .../Utils/TaskExtension.cs | 34 +++++++++++++++++++ 3 files changed, 41 insertions(+), 5 deletions(-) create mode 100644 SDK/AppCenter/Microsoft.AppCenter.Windows.Shared/Utils/TaskExtension.cs diff --git a/SDK/AppCenter/Microsoft.AppCenter.Windows.Shared/Microsoft.AppCenter.Windows.Shared.projitems b/SDK/AppCenter/Microsoft.AppCenter.Windows.Shared/Microsoft.AppCenter.Windows.Shared.projitems index 05e378ee2..e1753d4de 100644 --- a/SDK/AppCenter/Microsoft.AppCenter.Windows.Shared/Microsoft.AppCenter.Windows.Shared.projitems +++ b/SDK/AppCenter/Microsoft.AppCenter.Windows.Shared/Microsoft.AppCenter.Windows.Shared.projitems @@ -71,6 +71,7 @@ + diff --git a/SDK/AppCenter/Microsoft.AppCenter.Windows.Shared/Storage/Storage.cs b/SDK/AppCenter/Microsoft.AppCenter.Windows.Shared/Storage/Storage.cs index 6c1e1fd41..1e69cd010 100644 --- a/SDK/AppCenter/Microsoft.AppCenter.Windows.Shared/Storage/Storage.cs +++ b/SDK/AppCenter/Microsoft.AppCenter.Windows.Shared/Storage/Storage.cs @@ -6,6 +6,7 @@ using System.Threading.Tasks; using Microsoft.AppCenter.Ingestion.Models; using Microsoft.AppCenter.Ingestion.Models.Serialization; +using Microsoft.AppCenter.Utils; using Newtonsoft.Json; using SQLite; @@ -52,7 +53,7 @@ public Storage() : this(DefaultAdapter()) internal Storage(IStorageAdapter adapter) { _storageAdapter = adapter; - _queue.Add(new Task(() => InitializeDatabaseAsync().Wait())); + _queue.Add(new Task(() => InitializeDatabaseAsync().RunNotAsync())); _queueFlushTask = Task.Run(FlushQueueAsync); } @@ -87,7 +88,7 @@ public Task PutLog(string channelName, Log log) { var logJsonString = LogSerializer.Serialize(log); var logEntry = new LogEntry {Channel = channelName, Log = logJsonString}; - _storageAdapter.InsertAsync(logEntry).Wait(); + _storageAdapter.InsertAsync(logEntry).RunNotAsync(); }); try { @@ -128,7 +129,7 @@ public Task DeleteLogs(string channelName, string batchId) { _storageAdapter .DeleteAsync(entry => entry.Channel == channelName && entry.Id == id) - .Wait(); + .RunNotAsync(); } } catch (KeyNotFoundException e) @@ -163,7 +164,7 @@ public Task DeleteLogs(string channelName) $"Deleting all logs from storage for channel '{channelName}'"); ClearPendingLogStateWithoutEnqueue(channelName); _storageAdapter.DeleteAsync(entry => entry.Channel == channelName) - .Wait(); + .RunNotAsync(); } catch (KeyNotFoundException e) { @@ -290,7 +291,7 @@ public async Task GetLogsAsync(string channelName, int limit, List AppCenterLog.Error(AppCenterLog.LogTag, "Cannot deserialize a log in storage", e); failedToDeserializeALog = true; _storageAdapter.DeleteAsync(row => row.Id == entry.Id) - .Wait(); + .RunNotAsync(); } } if (failedToDeserializeALog) diff --git a/SDK/AppCenter/Microsoft.AppCenter.Windows.Shared/Utils/TaskExtension.cs b/SDK/AppCenter/Microsoft.AppCenter.Windows.Shared/Utils/TaskExtension.cs new file mode 100644 index 000000000..eb481e4ad --- /dev/null +++ b/SDK/AppCenter/Microsoft.AppCenter.Windows.Shared/Utils/TaskExtension.cs @@ -0,0 +1,34 @@ +using System; +using System.Threading.Tasks; + +namespace Microsoft.AppCenter.Utils +{ + internal static class TaskExtension + { + public static T RunNotAsync(this Task @this) + { + try + { + @this.Wait(); + } + catch (AggregateException e) + { + throw e.InnerException; + } + + return @this.Result; + } + + public static void RunNotAsync(this Task @this) + { + try + { + @this.Wait(); + } + catch (AggregateException e) + { + throw e.InnerException; + } + } + } +} \ No newline at end of file From 923e5b0c800dc9b8b968ba1ff672e4bd148adc29 Mon Sep 17 00:00:00 2001 From: snrnats Date: Thu, 22 Feb 2018 00:03:33 +0300 Subject: [PATCH 02/46] Use GetAwaiter().GetResult instead of util method --- ...crosoft.AppCenter.Windows.Shared.projitems | 1 - .../Storage/Storage.cs | 10 +++--- .../Utils/TaskExtension.cs | 34 ------------------- 3 files changed, 5 insertions(+), 40 deletions(-) delete mode 100644 SDK/AppCenter/Microsoft.AppCenter.Windows.Shared/Utils/TaskExtension.cs diff --git a/SDK/AppCenter/Microsoft.AppCenter.Windows.Shared/Microsoft.AppCenter.Windows.Shared.projitems b/SDK/AppCenter/Microsoft.AppCenter.Windows.Shared/Microsoft.AppCenter.Windows.Shared.projitems index e1753d4de..05e378ee2 100644 --- a/SDK/AppCenter/Microsoft.AppCenter.Windows.Shared/Microsoft.AppCenter.Windows.Shared.projitems +++ b/SDK/AppCenter/Microsoft.AppCenter.Windows.Shared/Microsoft.AppCenter.Windows.Shared.projitems @@ -71,7 +71,6 @@ - diff --git a/SDK/AppCenter/Microsoft.AppCenter.Windows.Shared/Storage/Storage.cs b/SDK/AppCenter/Microsoft.AppCenter.Windows.Shared/Storage/Storage.cs index 1e69cd010..a7069155b 100644 --- a/SDK/AppCenter/Microsoft.AppCenter.Windows.Shared/Storage/Storage.cs +++ b/SDK/AppCenter/Microsoft.AppCenter.Windows.Shared/Storage/Storage.cs @@ -53,7 +53,7 @@ public Storage() : this(DefaultAdapter()) internal Storage(IStorageAdapter adapter) { _storageAdapter = adapter; - _queue.Add(new Task(() => InitializeDatabaseAsync().RunNotAsync())); + _queue.Add(new Task(() => InitializeDatabaseAsync().GetAwaiter().GetResult())); _queueFlushTask = Task.Run(FlushQueueAsync); } @@ -88,7 +88,7 @@ public Task PutLog(string channelName, Log log) { var logJsonString = LogSerializer.Serialize(log); var logEntry = new LogEntry {Channel = channelName, Log = logJsonString}; - _storageAdapter.InsertAsync(logEntry).RunNotAsync(); + _storageAdapter.InsertAsync(logEntry).GetAwaiter().GetResult(); }); try { @@ -129,7 +129,7 @@ public Task DeleteLogs(string channelName, string batchId) { _storageAdapter .DeleteAsync(entry => entry.Channel == channelName && entry.Id == id) - .RunNotAsync(); + .GetAwaiter().GetResult(); } } catch (KeyNotFoundException e) @@ -164,7 +164,7 @@ public Task DeleteLogs(string channelName) $"Deleting all logs from storage for channel '{channelName}'"); ClearPendingLogStateWithoutEnqueue(channelName); _storageAdapter.DeleteAsync(entry => entry.Channel == channelName) - .RunNotAsync(); + .GetAwaiter().GetResult(); } catch (KeyNotFoundException e) { @@ -291,7 +291,7 @@ public async Task GetLogsAsync(string channelName, int limit, List AppCenterLog.Error(AppCenterLog.LogTag, "Cannot deserialize a log in storage", e); failedToDeserializeALog = true; _storageAdapter.DeleteAsync(row => row.Id == entry.Id) - .RunNotAsync(); + .GetAwaiter().GetResult(); } } if (failedToDeserializeALog) diff --git a/SDK/AppCenter/Microsoft.AppCenter.Windows.Shared/Utils/TaskExtension.cs b/SDK/AppCenter/Microsoft.AppCenter.Windows.Shared/Utils/TaskExtension.cs deleted file mode 100644 index eb481e4ad..000000000 --- a/SDK/AppCenter/Microsoft.AppCenter.Windows.Shared/Utils/TaskExtension.cs +++ /dev/null @@ -1,34 +0,0 @@ -using System; -using System.Threading.Tasks; - -namespace Microsoft.AppCenter.Utils -{ - internal static class TaskExtension - { - public static T RunNotAsync(this Task @this) - { - try - { - @this.Wait(); - } - catch (AggregateException e) - { - throw e.InnerException; - } - - return @this.Result; - } - - public static void RunNotAsync(this Task @this) - { - try - { - @this.Wait(); - } - catch (AggregateException e) - { - throw e.InnerException; - } - } - } -} \ No newline at end of file From a4ea73cf42f43471107b22266f5b576ca99198c3 Mon Sep 17 00:00:00 2001 From: snrnats Date: Thu, 22 Feb 2018 13:00:58 +0300 Subject: [PATCH 03/46] Use GetAwaiter().GetResult() instead of Result to get original exception if any are thrown --- .../Microsoft.AppCenter.Windows.Shared/Storage/Storage.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SDK/AppCenter/Microsoft.AppCenter.Windows.Shared/Storage/Storage.cs b/SDK/AppCenter/Microsoft.AppCenter.Windows.Shared/Storage/Storage.cs index a7069155b..4ca9a9d89 100644 --- a/SDK/AppCenter/Microsoft.AppCenter.Windows.Shared/Storage/Storage.cs +++ b/SDK/AppCenter/Microsoft.AppCenter.Windows.Shared/Storage/Storage.cs @@ -194,7 +194,7 @@ public async Task CountLogsAsync(string channelName) var task = new Task(() => { return _storageAdapter.CountAsync(entry => entry.Channel == channelName) - .Result; + .GetAwaiter().GetResult(); }); try { @@ -273,7 +273,7 @@ public async Task GetLogsAsync(string channelName, int limit, List var failedToDeserializeALog = false; var retrievedEntries = _storageAdapter.GetAsync(entry => entry.Channel == channelName, limit) - .Result; + .GetAwaiter().GetResult(); foreach (var entry in retrievedEntries) { if (_pendingDbIdentifiers.Contains(entry.Id)) From 080976ab416afacd37f411669953fdd0d1d0635a Mon Sep 17 00:00:00 2001 From: snrnats Date: Thu, 22 Feb 2018 13:02:52 +0300 Subject: [PATCH 04/46] Updated unit tests to properly detect exceptions thrown by Storage --- .../Storage/FakeStorageTest.cs | 10 +++++----- .../TaskExtension.cs | 19 ++----------------- 2 files changed, 7 insertions(+), 22 deletions(-) diff --git a/Tests/Microsoft.AppCenter.Test.Windows/Storage/FakeStorageTest.cs b/Tests/Microsoft.AppCenter.Test.Windows/Storage/FakeStorageTest.cs index 5e27b080e..efc15ed36 100644 --- a/Tests/Microsoft.AppCenter.Test.Windows/Storage/FakeStorageTest.cs +++ b/Tests/Microsoft.AppCenter.Test.Windows/Storage/FakeStorageTest.cs @@ -85,7 +85,7 @@ public void GetLogsQueryError() var mockAdapter = new Mock(); mockAdapter.Setup( a => a.GetAsync(It.IsAny(), It.IsAny())) - .Throws(new StorageException()); + .ThrowsAsync(new StorageException()); var fakeStorage = new Microsoft.AppCenter.Storage.Storage(mockAdapter.Object); var logs = new List(); Assert.ThrowsException(() => @@ -101,13 +101,13 @@ public void StorageThrowsStorageException() var mockAdapter = new Mock(); mockAdapter.Setup( a => a.GetAsync(It.IsAny(), It.IsAny())) - .Throws(new StorageException()); + .ThrowsAsync(new StorageException()); mockAdapter.Setup(c => c.InsertAsync(It.IsAny())) - .Throws(new StorageException()); + .ThrowsAsync(new StorageException()); mockAdapter.Setup(c => c.DeleteAsync(It.IsAny>>())) - .Throws(new StorageException()); + .ThrowsAsync(new StorageException()); mockAdapter.Setup(c => c.CountAsync(It.IsAny>>())) - .Throws(new StorageException()); + .ThrowsAsync(new StorageException()); var fakeStorage = new Microsoft.AppCenter.Storage.Storage(mockAdapter.Object); Assert.ThrowsException(() => fakeStorage.PutLog("channel_name", new TestLog()).RunNotAsync()); diff --git a/Tests/Microsoft.AppCenter.Test.Windows/TaskExtension.cs b/Tests/Microsoft.AppCenter.Test.Windows/TaskExtension.cs index 836e013eb..0b1732ee4 100644 --- a/Tests/Microsoft.AppCenter.Test.Windows/TaskExtension.cs +++ b/Tests/Microsoft.AppCenter.Test.Windows/TaskExtension.cs @@ -8,26 +8,11 @@ public static class TaskExtension { public static T RunNotAsync(this Task @this) { - try - { - @this.Wait(); - } - catch (AggregateException e) - { - throw e.InnerException; - } - return @this.Result; + return @this.GetAwaiter().GetResult(); } public static void RunNotAsync(this Task @this) { - try - { - @this.Wait(); - } - catch (AggregateException e) - { - throw e.InnerException; - } + @this.GetAwaiter().GetResult(); } public static Task GetCompletedTask() From 1d9c724e70f978798c17043b9c3ed2146ae1b689 Mon Sep 17 00:00:00 2001 From: snrnats Date: Fri, 23 Feb 2018 10:40:03 +0300 Subject: [PATCH 05/46] Inlined GetAwaiter().GetResult() in unit tests --- .../AppCenterTest.cs | 8 ++-- .../Channel/ChannelGroupTest.cs | 2 +- .../Channel/ChannelTest.cs | 38 +++++++++---------- .../Ingestion/Http/IngestionHttpTest.cs | 9 +++-- .../Ingestion/Http/NetworkStateTest.cs | 2 +- .../Ingestion/Http/RetryableTest.cs | 23 +++++++---- .../Ingestion/Http/ServiceCallTest.cs | 7 +++- .../Models/CustomPropertiesLogTest.cs | 4 +- .../Ingestion/Models/StartServiceLogTest.cs | 4 +- .../Storage/FakeStorageTest.cs | 18 ++++----- .../Storage/StorageTest.cs | 38 +++++++++---------- .../TaskExtension.cs | 9 ----- 12 files changed, 84 insertions(+), 78 deletions(-) diff --git a/Tests/Microsoft.AppCenter.Test.Windows/AppCenterTest.cs b/Tests/Microsoft.AppCenter.Test.Windows/AppCenterTest.cs index 9d8a20b36..40d421720 100644 --- a/Tests/Microsoft.AppCenter.Test.Windows/AppCenterTest.cs +++ b/Tests/Microsoft.AppCenter.Test.Windows/AppCenterTest.cs @@ -160,7 +160,7 @@ public void GetEnabled() public void SetEnabledSameValue() { AppCenter.Start("appsecret", typeof(MockAppCenterService)); - AppCenter.SetEnabledAsync(AppCenter.IsEnabledAsync().Result).RunNotAsync(); + AppCenter.SetEnabledAsync(AppCenter.IsEnabledAsync().Result).GetAwaiter().GetResult(); MockAppCenterService.Mock.VerifySet(service => service.InstanceEnabled = It.IsAny(), Times.Never()); _settingsMock.Verify(settings => settings.SetValue(AppCenter.EnabledKey, It.IsAny()), Times.Never()); @@ -175,7 +175,7 @@ public void SetEnabledDifferentValueAfterConfigure() { AppCenter.Start("appsecret", typeof(MockAppCenterService)); var setVal = !AppCenter.IsEnabledAsync().Result; - AppCenter.SetEnabledAsync(setVal).RunNotAsync(); + AppCenter.SetEnabledAsync(setVal).GetAwaiter().GetResult(); MockAppCenterService.Mock.VerifySet(service => service.InstanceEnabled = setVal, Times.Once()); _settingsMock.Verify(settings => settings.SetValue(AppCenter.EnabledKey, setVal), Times.Once()); @@ -190,7 +190,7 @@ public void SetEnabledDifferentValueBeforeConfigure() { _settingsMock.Setup(settings => settings.GetValue(AppCenter.EnabledKey, It.IsAny())) .Returns(true); - AppCenter.SetEnabledAsync(false).RunNotAsync(); + AppCenter.SetEnabledAsync(false).GetAwaiter().GetResult(); AppCenter.Start("appsecret", typeof(MockAppCenterService)); _settingsMock.Verify(settings => settings.SetValue(AppCenter.EnabledKey, false), Times.Once()); @@ -587,7 +587,7 @@ public void SendStartServicesAfterEnable() _settingsMock.SetupSequence(settings => settings.GetValue(AppCenter.EnabledKey, It.IsAny())) .Returns(false).Returns(true); - AppCenter.SetEnabledAsync(true).RunNotAsync(); + AppCenter.SetEnabledAsync(true).GetAwaiter().GetResult(); _channelMock.Verify(channel => channel.EnqueueAsync(It.Is(log => log.Services.Count == 1 && log.Services[0] == MockAppCenterService.Instance.ServiceName)), Times.Once()); diff --git a/Tests/Microsoft.AppCenter.Test.Windows/Channel/ChannelGroupTest.cs b/Tests/Microsoft.AppCenter.Test.Windows/Channel/ChannelGroupTest.cs index 5801d5b52..a807b6dc6 100644 --- a/Tests/Microsoft.AppCenter.Test.Windows/Channel/ChannelGroupTest.cs +++ b/Tests/Microsoft.AppCenter.Test.Windows/Channel/ChannelGroupTest.cs @@ -190,7 +190,7 @@ public void TestShutdownChannelGroup() var addedChannel = _channelGroup.AddChannel(channelName, 2, TimeSpan.FromSeconds(3), 3) as Microsoft.AppCenter.Channel.Channel; - _channelGroup.ShutdownAsync().RunNotAsync(); + _channelGroup.ShutdownAsync().GetAwaiter().GetResult(); Assert.IsFalse(addedChannel.IsEnabled); } diff --git a/Tests/Microsoft.AppCenter.Test.Windows/Channel/ChannelTest.cs b/Tests/Microsoft.AppCenter.Test.Windows/Channel/ChannelTest.cs index 9c91bb7fc..930ef18b8 100644 --- a/Tests/Microsoft.AppCenter.Test.Windows/Channel/ChannelTest.cs +++ b/Tests/Microsoft.AppCenter.Test.Windows/Channel/ChannelTest.cs @@ -123,7 +123,7 @@ public void EnqueuedLogsAreSame() sem.Release(); }; - _channel.EnqueueAsync(log).RunNotAsync(); + _channel.EnqueueAsync(log).GetAwaiter().GetResult(); Assert.IsTrue(sem.Wait(DefaultWaitTime)); } @@ -136,7 +136,7 @@ public void EnqueueMaxLogs() SetChannelWithTimeSpan(TimeSpan.FromHours(1)); for (var i = 0; i < MaxLogsPerBatch; ++i) { - _channel.EnqueueAsync(new TestLog()).RunNotAsync(); + _channel.EnqueueAsync(new TestLog()).GetAwaiter().GetResult(); } Assert.IsTrue(SendingLogOccurred(1)); } @@ -149,7 +149,7 @@ public void EnqueueWhileDisabled() { _channel.SetEnabled(false); var log = new TestLog(); - _channel.EnqueueAsync(log).RunNotAsync(); + _channel.EnqueueAsync(log).GetAwaiter().GetResult(); Assert.IsTrue(FailedToSendLogOccurred(1)); Assert.IsFalse(EnqueuingLogOccurred(1)); } @@ -159,7 +159,7 @@ public void ChannelInvokesFilteringLogEvent() { for (var i = 0; i < MaxLogsPerBatch; ++i) { - _channel.EnqueueAsync(new TestLog()).RunNotAsync(); + _channel.EnqueueAsync(new TestLog()).GetAwaiter().GetResult(); } Assert.IsTrue(FilteringLogOccurred(MaxLogsPerBatch)); @@ -174,7 +174,7 @@ public void FilterLogShouldNotSend() _channel.FilteringLog += (sender, args) => args.FilterRequested = true; for (int i = 0; i < MaxLogsPerBatch; ++i) { - _channel.EnqueueAsync(new TestLog()).RunNotAsync(); + _channel.EnqueueAsync(new TestLog()).GetAwaiter().GetResult(); } Assert.IsTrue(FilteringLogOccurred(MaxLogsPerBatch)); Assert.IsFalse(SendingLogOccurred(MaxLogsPerBatch)); @@ -191,7 +191,7 @@ public void FilterLogThenCancelFilterLogInAnotherHandlerShouldSend() _channel.FilteringLog += (sender, args) => args.FilterRequested = false; for (int i = 0; i < MaxLogsPerBatch; ++i) { - _channel.EnqueueAsync(new TestLog()).RunNotAsync(); + _channel.EnqueueAsync(new TestLog()).GetAwaiter().GetResult(); } Assert.IsTrue(FilteringLogOccurred(MaxLogsPerBatch)); Assert.IsTrue(SendingLogOccurred(MaxLogsPerBatch)); @@ -203,7 +203,7 @@ public void ChannelInvokesSendingLogEvent() { for (var i = 0; i < MaxLogsPerBatch; ++i) { - _channel.EnqueueAsync(new TestLog()).RunNotAsync(); + _channel.EnqueueAsync(new TestLog()).GetAwaiter().GetResult(); } Assert.IsTrue(SendingLogOccurred(MaxLogsPerBatch)); @@ -214,7 +214,7 @@ public void ChannelInvokesSentLogEvent() { for (var i = 0; i < MaxLogsPerBatch; ++i) { - _channel.EnqueueAsync(new TestLog()).RunNotAsync(); + _channel.EnqueueAsync(new TestLog()).GetAwaiter().GetResult(); } Assert.IsTrue(SentLogOccurred(MaxLogsPerBatch)); @@ -226,7 +226,7 @@ public void ChannelInvokesFailedToSendLogEvent() MakeIngestionCallsFail(); for (var i = 0; i < MaxLogsPerBatch; ++i) { - _channel.EnqueueAsync(new TestLog()).RunNotAsync(); + _channel.EnqueueAsync(new TestLog()).GetAwaiter().GetResult(); } Assert.IsTrue(FailedToSendLogOccurred(MaxLogsPerBatch)); @@ -251,10 +251,10 @@ public void FailedToSendLogEventArgsAreSame() [TestMethod] public void ChannelInvokesSendingLogEventAfterEnabling() { - _channel.ShutdownAsync().RunNotAsync(); + _channel.ShutdownAsync().GetAwaiter().GetResult(); for (int i = 0; i < MaxLogsPerBatch; ++i) { - _channel.EnqueueAsync(new TestLog()).RunNotAsync(); + _channel.EnqueueAsync(new TestLog()).GetAwaiter().GetResult(); } _channel.SetEnabled(true); @@ -271,7 +271,7 @@ public void ChannelInvokesFailedToSendLogEventAfterDisabling() _channel.SetEnabled(false); for (int i = 0; i < MaxLogsPerBatch; ++i) { - _channel.EnqueueAsync(new TestLog()).RunNotAsync(); + _channel.EnqueueAsync(new TestLog()).GetAwaiter().GetResult(); } Assert.IsTrue(SendingLogOccurred(MaxLogsPerBatch)); @@ -284,10 +284,10 @@ public void ChannelInvokesFailedToSendLogEventAfterDisabling() [TestMethod] public void ClearLogs() { - _channel.ShutdownAsync().RunNotAsync(); - _channel.EnqueueAsync(new TestLog()).RunNotAsync(); + _channel.ShutdownAsync().GetAwaiter().GetResult(); + _channel.EnqueueAsync(new TestLog()).GetAwaiter().GetResult(); - _channel.ClearAsync().RunNotAsync(); + _channel.ClearAsync().GetAwaiter().GetResult(); _channel.SetEnabled(true); Assert.IsFalse(SendingLogOccurred(1)); @@ -333,8 +333,8 @@ public void ThrowStorageExceptionInDeleteLogsTime() SetupEventCallbacks(); // Shutdown channel and store some log - _channel.ShutdownAsync().RunNotAsync(); - _channel.EnqueueAsync(log).RunNotAsync(); + _channel.ShutdownAsync().GetAwaiter().GetResult(); + _channel.EnqueueAsync(log).GetAwaiter().GetResult(); _channel.SetEnabled(true); @@ -351,7 +351,7 @@ public void IngestionNotClosedOnRecoverableHttpError() { _mockIngestion.CallShouldSucceed = false; _mockIngestion.TaskError = new RecoverableIngestionException(); - _channel.EnqueueAsync(new TestLog()).RunNotAsync(); + _channel.EnqueueAsync(new TestLog()).GetAwaiter().GetResult(); // wait for SendingLog event _eventSemaphores[SendingLogSemaphoreIdx].Wait(); @@ -369,7 +369,7 @@ public void IngestionClosedOnNonRecoverableHttpError() { _mockIngestion.CallShouldSucceed = false; _mockIngestion.TaskError = new NonRecoverableIngestionException(); - _channel.EnqueueAsync(new TestLog()).RunNotAsync(); + _channel.EnqueueAsync(new TestLog()).GetAwaiter().GetResult(); // wait up to 20 seconds for suspend to finish bool disabled = WaitForChannelDisable(TimeSpan.FromSeconds(20)); diff --git a/Tests/Microsoft.AppCenter.Test.Windows/Ingestion/Http/IngestionHttpTest.cs b/Tests/Microsoft.AppCenter.Test.Windows/Ingestion/Http/IngestionHttpTest.cs index 44d7ed7a9..725b998b3 100644 --- a/Tests/Microsoft.AppCenter.Test.Windows/Ingestion/Http/IngestionHttpTest.cs +++ b/Tests/Microsoft.AppCenter.Test.Windows/Ingestion/Http/IngestionHttpTest.cs @@ -29,7 +29,7 @@ public void IngestionHttpStatusCodeOk() { var call = PrepareServiceCall(); SetupAdapterSendResponse(HttpStatusCode.OK); - _ingestionHttp.ExecuteCallAsync(call).RunNotAsync(); + _ingestionHttp.ExecuteCallAsync(call).GetAwaiter().GetResult(); VerifyAdapterSend(Times.Once()); // No throw any exception @@ -43,7 +43,10 @@ public void IngestionHttpStatusCodeError() { var call = PrepareServiceCall(); SetupAdapterSendResponse(HttpStatusCode.NotFound); - Assert.ThrowsException(() => _ingestionHttp.ExecuteCallAsync(call).RunNotAsync()); + Assert.ThrowsException(() => + { + _ingestionHttp.ExecuteCallAsync(call).GetAwaiter().GetResult(); + }); VerifyAdapterSend(Times.Once()); } @@ -56,7 +59,7 @@ public void IngestionHttpCancel() var call = PrepareServiceCall(); call.Cancel(); SetupAdapterSendResponse(HttpStatusCode.OK); - _ingestionHttp.ExecuteCallAsync(call).RunNotAsync(); + _ingestionHttp.ExecuteCallAsync(call).GetAwaiter().GetResult(); VerifyAdapterSend(Times.Never()); } diff --git a/Tests/Microsoft.AppCenter.Test.Windows/Ingestion/Http/NetworkStateTest.cs b/Tests/Microsoft.AppCenter.Test.Windows/Ingestion/Http/NetworkStateTest.cs index 62bc7dff5..125d86d74 100644 --- a/Tests/Microsoft.AppCenter.Test.Windows/Ingestion/Http/NetworkStateTest.cs +++ b/Tests/Microsoft.AppCenter.Test.Windows/Ingestion/Http/NetworkStateTest.cs @@ -51,7 +51,7 @@ public void NetworkStateIngestionOnline() var call = PrepareServiceCall(); SetupAdapterSendResponse(HttpStatusCode.OK); _networkState.IsConnected = true; - _networkStateIngestion.ExecuteCallAsync(call).RunNotAsync(); + _networkStateIngestion.ExecuteCallAsync(call).GetAwaiter().GetResult(); VerifyAdapterSend(Times.Once()); // No throw any exception diff --git a/Tests/Microsoft.AppCenter.Test.Windows/Ingestion/Http/RetryableTest.cs b/Tests/Microsoft.AppCenter.Test.Windows/Ingestion/Http/RetryableTest.cs index d32725f1c..430072574 100644 --- a/Tests/Microsoft.AppCenter.Test.Windows/Ingestion/Http/RetryableTest.cs +++ b/Tests/Microsoft.AppCenter.Test.Windows/Ingestion/Http/RetryableTest.cs @@ -58,7 +58,7 @@ public void RetryableIngestionSuccess() { var call = PrepareServiceCall(); SetupAdapterSendResponse(HttpStatusCode.OK); - _retryableIngestion.ExecuteCallAsync(call).RunNotAsync(); + _retryableIngestion.ExecuteCallAsync(call).GetAwaiter().GetResult(); VerifyAdapterSend(Times.Once()); // No throw any exception @@ -82,7 +82,7 @@ public void RetryableIngestionRepeat1() _intervals[1].OnRequest += () => Assert.Fail(); // Run all chain not async - _retryableIngestion.ExecuteCallAsync(call).RunNotAsync(); + _retryableIngestion.ExecuteCallAsync(call).GetAwaiter().GetResult(); // Must be sent 2 times: 1 - main, 1 - repeat VerifyAdapterSend(Times.Exactly(2)); @@ -109,7 +109,7 @@ public void RetryableIngestionRepeat3() _intervals[2].OnRequest += () => VerifyAdapterSend(Times.Exactly(3)); // Run all chain not async - _retryableIngestion.ExecuteCallAsync(call).RunNotAsync(); + _retryableIngestion.ExecuteCallAsync(call).GetAwaiter().GetResult(); // Must be sent 4 times: 1 - main, 3 - repeat VerifyAdapterSend(Times.Exactly(4)); @@ -134,7 +134,10 @@ public void RetryableIngestionCancel() _intervals[2].OnRequest += () => Assert.Fail(); // Run all chain not async - Assert.ThrowsException(() => _retryableIngestion.ExecuteCallAsync(call).RunNotAsync()); + Assert.ThrowsException(() => + { + _retryableIngestion.ExecuteCallAsync(call).GetAwaiter().GetResult(); + }); // Must be sent 2 times: 1 - main, 1 - repeat VerifyAdapterSend(Times.Exactly(2)); @@ -148,7 +151,10 @@ public void RetryableIngestionException() { var call = PrepareServiceCall(); SetupAdapterSendResponse(HttpStatusCode.BadRequest); - Assert.ThrowsException(() => _retryableIngestion.ExecuteCallAsync(call).RunNotAsync()); + Assert.ThrowsException(() => + { + _retryableIngestion.ExecuteCallAsync(call).GetAwaiter().GetResult(); + }); VerifyAdapterSend(Times.Once()); } @@ -157,7 +163,7 @@ public void ServiceCallSuccessCallbackTest() { SetupAdapterSendResponse(HttpStatusCode.OK); var call = PrepareServiceCall(); - call.ExecuteAsync().RunNotAsync(); + call.ExecuteAsync().GetAwaiter().GetResult(); // No throw any exception } @@ -167,7 +173,10 @@ public void ServiceCallFailedCallbackTest() { SetupAdapterSendResponse(HttpStatusCode.NotFound); var call = PrepareServiceCall(); - Assert.ThrowsException(() => { call.ExecuteAsync().RunNotAsync(); }); + Assert.ThrowsException(() => + { + call.ExecuteAsync().GetAwaiter().GetResult(); + }); } /// diff --git a/Tests/Microsoft.AppCenter.Test.Windows/Ingestion/Http/ServiceCallTest.cs b/Tests/Microsoft.AppCenter.Test.Windows/Ingestion/Http/ServiceCallTest.cs index a201111e6..ef9291eb1 100644 --- a/Tests/Microsoft.AppCenter.Test.Windows/Ingestion/Http/ServiceCallTest.cs +++ b/Tests/Microsoft.AppCenter.Test.Windows/Ingestion/Http/ServiceCallTest.cs @@ -23,14 +23,17 @@ public void CheckSuccessCallback() { _ingestion.CallShouldSucceed = true; - _serviceCall.ExecuteAsync().RunNotAsync(); + _serviceCall.ExecuteAsync().GetAwaiter().GetResult(); } [TestMethod] public void CheckUnsuccessCallback() { _ingestion.CallShouldSucceed = false; - Assert.ThrowsException(() => _serviceCall.ExecuteAsync().RunNotAsync()); + Assert.ThrowsException(() => + { + _serviceCall.ExecuteAsync().GetAwaiter().GetResult(); + }); } } } diff --git a/Tests/Microsoft.AppCenter.Test.Windows/Ingestion/Models/CustomPropertiesLogTest.cs b/Tests/Microsoft.AppCenter.Test.Windows/Ingestion/Models/CustomPropertiesLogTest.cs index eaa7a2c5a..90a6196d5 100644 --- a/Tests/Microsoft.AppCenter.Test.Windows/Ingestion/Models/CustomPropertiesLogTest.cs +++ b/Tests/Microsoft.AppCenter.Test.Windows/Ingestion/Models/CustomPropertiesLogTest.cs @@ -39,7 +39,7 @@ public void SaveCustomPropertiesLog() { var addedLog = new CustomPropertyLog { - Device = new DeviceInformationHelper().GetDeviceInformationAsync().RunNotAsync(), + Device = new DeviceInformationHelper().GetDeviceInformationAsync().GetAwaiter().GetResult(), Timestamp = DateTime.Now, Properties = new List { @@ -57,7 +57,7 @@ public void SaveCustomPropertiesLog() storage.DeleteLogs(StorageTestChannelName); storage.PutLog(StorageTestChannelName, addedLog); var retrievedLogs = new List(); - storage.GetLogsAsync(StorageTestChannelName, 1, retrievedLogs).RunNotAsync(); + storage.GetLogsAsync(StorageTestChannelName, 1, retrievedLogs).GetAwaiter().GetResult(); var retrievedLog = retrievedLogs[0] as CustomPropertyLog; foreach (var addedProperty in addedLog.Properties) diff --git a/Tests/Microsoft.AppCenter.Test.Windows/Ingestion/Models/StartServiceLogTest.cs b/Tests/Microsoft.AppCenter.Test.Windows/Ingestion/Models/StartServiceLogTest.cs index a15041643..79648c475 100644 --- a/Tests/Microsoft.AppCenter.Test.Windows/Ingestion/Models/StartServiceLogTest.cs +++ b/Tests/Microsoft.AppCenter.Test.Windows/Ingestion/Models/StartServiceLogTest.cs @@ -55,7 +55,7 @@ public void SaveStartServiceLog() { var addedLog = new StartServiceLog { - Device = new DeviceInformationHelper().GetDeviceInformationAsync().RunNotAsync(), + Device = new DeviceInformationHelper().GetDeviceInformationAsync().GetAwaiter().GetResult(), Timestamp = DateTime.Now, Services = new List {"Service0", "Service1", "Service2"}, Sid = Guid.NewGuid() @@ -65,7 +65,7 @@ public void SaveStartServiceLog() storage.DeleteLogs(StorageTestChannelName); storage.PutLog(StorageTestChannelName, addedLog); var retrievedLogs = new List(); - storage.GetLogsAsync(StorageTestChannelName, 1, retrievedLogs).RunNotAsync(); + storage.GetLogsAsync(StorageTestChannelName, 1, retrievedLogs).GetAwaiter().GetResult(); var retrievedLog = retrievedLogs[0] as StartServiceLog; foreach (var serviceName in addedLog.Services) diff --git a/Tests/Microsoft.AppCenter.Test.Windows/Storage/FakeStorageTest.cs b/Tests/Microsoft.AppCenter.Test.Windows/Storage/FakeStorageTest.cs index efc15ed36..faf083d05 100644 --- a/Tests/Microsoft.AppCenter.Test.Windows/Storage/FakeStorageTest.cs +++ b/Tests/Microsoft.AppCenter.Test.Windows/Storage/FakeStorageTest.cs @@ -35,7 +35,7 @@ public void ShutdownTimeout() storage.PutLog(StorageTestChannelName, new TestLog()); #pragma warning restore 4014 - var result = storage.ShutdownAsync(TimeSpan.FromTicks(1)).RunNotAsync(); + var result = storage.ShutdownAsync(TimeSpan.FromTicks(1)).GetAwaiter().GetResult(); Assert.IsFalse(result); } @@ -58,7 +58,7 @@ public void ShutdownSucceed() storage.PutLog(StorageTestChannelName, new TestLog()); #pragma warning restore 4014 - var result = storage.ShutdownAsync(TimeSpan.FromSeconds(100)).RunNotAsync(); + var result = storage.ShutdownAsync(TimeSpan.FromSeconds(100)).GetAwaiter().GetResult(); Assert.IsTrue(result); } @@ -70,10 +70,10 @@ public void ShutdownPreventsNewTasks() { var mockConnection = new Mock(); var storage = new Microsoft.AppCenter.Storage.Storage(mockConnection.Object); - var result = storage.ShutdownAsync(TimeSpan.FromSeconds(10)).RunNotAsync(); + var result = storage.ShutdownAsync(TimeSpan.FromSeconds(10)).GetAwaiter().GetResult(); Assert.IsTrue(result); Assert.ThrowsException( - () => storage.GetLogsAsync(It.IsAny(), It.IsAny(), It.IsAny>()).RunNotAsync()); + () => storage.GetLogsAsync(It.IsAny(), It.IsAny(), It.IsAny>()).GetAwaiter().GetResult()); } /// @@ -89,7 +89,7 @@ public void GetLogsQueryError() var fakeStorage = new Microsoft.AppCenter.Storage.Storage(mockAdapter.Object); var logs = new List(); Assert.ThrowsException(() => - fakeStorage.GetLogsAsync(StorageTestChannelName, 1, logs).RunNotAsync()); + fakeStorage.GetLogsAsync(StorageTestChannelName, 1, logs).GetAwaiter().GetResult()); } /// @@ -110,10 +110,10 @@ public void StorageThrowsStorageException() .ThrowsAsync(new StorageException()); var fakeStorage = new Microsoft.AppCenter.Storage.Storage(mockAdapter.Object); - Assert.ThrowsException(() => fakeStorage.PutLog("channel_name", new TestLog()).RunNotAsync()); - Assert.ThrowsException(() => fakeStorage.DeleteLogs("channel_name", string.Empty).RunNotAsync()); - Assert.ThrowsException(() => fakeStorage.CountLogsAsync("channel_name").RunNotAsync()); - Assert.ThrowsException(() => fakeStorage.GetLogsAsync("channel_name", 1, new List()).RunNotAsync()); + Assert.ThrowsException(() => fakeStorage.PutLog("channel_name", new TestLog()).GetAwaiter().GetResult()); + Assert.ThrowsException(() => fakeStorage.DeleteLogs("channel_name", string.Empty).GetAwaiter().GetResult()); + Assert.ThrowsException(() => fakeStorage.CountLogsAsync("channel_name").GetAwaiter().GetResult()); + Assert.ThrowsException(() => fakeStorage.GetLogsAsync("channel_name", 1, new List()).GetAwaiter().GetResult()); } } } diff --git a/Tests/Microsoft.AppCenter.Test.Windows/Storage/StorageTest.cs b/Tests/Microsoft.AppCenter.Test.Windows/Storage/StorageTest.cs index 593b7f836..5b8c44ed0 100644 --- a/Tests/Microsoft.AppCenter.Test.Windows/Storage/StorageTest.cs +++ b/Tests/Microsoft.AppCenter.Test.Windows/Storage/StorageTest.cs @@ -24,7 +24,7 @@ public void InitializeStorageTest() [TestMethod] public void CountEmptyStorage() { - var count = _storage.CountLogsAsync(StorageTestChannelName).RunNotAsync(); + var count = _storage.CountLogsAsync(StorageTestChannelName).GetAwaiter().GetResult(); Assert.AreEqual(0, count); } @@ -36,7 +36,7 @@ public void CountNonemptyStorage() { var numLogsToAdd = 5; PutNLogs(numLogsToAdd); - var count = _storage.CountLogsAsync(StorageTestChannelName).RunNotAsync(); + var count = _storage.CountLogsAsync(StorageTestChannelName).GetAwaiter().GetResult(); Assert.AreEqual(numLogsToAdd, count); } @@ -49,7 +49,7 @@ public void PutOneLog() var addedLog = TestLog.CreateTestLog(); _storage.PutLog(StorageTestChannelName, addedLog); var retrievedLogs = new List(); - _storage.GetLogsAsync(StorageTestChannelName, 1, retrievedLogs).RunNotAsync(); + _storage.GetLogsAsync(StorageTestChannelName, 1, retrievedLogs).GetAwaiter().GetResult(); var retrievedLog = retrievedLogs[0]; Assert.AreEqual(addedLog, retrievedLog); } @@ -62,7 +62,7 @@ public void DeleteLogsNoBatchId() { PutNLogs(5); _storage.DeleteLogs(StorageTestChannelName); - var count = _storage.CountLogsAsync(StorageTestChannelName).RunNotAsync(); + var count = _storage.CountLogsAsync(StorageTestChannelName).GetAwaiter().GetResult(); Assert.AreEqual(0, count); } @@ -76,9 +76,9 @@ public void DeleteLogsWithBatchId() var limit = 3; var addedLogs = PutNLogs(numLogsToAdd); var retrievedLogs = new List(); - var batchId = _storage.GetLogsAsync(StorageTestChannelName, limit, retrievedLogs).RunNotAsync(); + var batchId = _storage.GetLogsAsync(StorageTestChannelName, limit, retrievedLogs).GetAwaiter().GetResult(); _storage.DeleteLogs(StorageTestChannelName, batchId); - var numLogsRemaining = _storage.CountLogsAsync(StorageTestChannelName).RunNotAsync(); + var numLogsRemaining = _storage.CountLogsAsync(StorageTestChannelName).GetAwaiter().GetResult(); Assert.AreEqual(numLogsToAdd - retrievedLogs.Count, numLogsRemaining); } @@ -92,7 +92,7 @@ public void GetLogsExactLimit() var limit = numLogsToAdd; var addedLogs = PutNLogs(numLogsToAdd); var retrievedLogs = new List(); - _storage.GetLogsAsync(StorageTestChannelName, limit, retrievedLogs).RunNotAsync(); + _storage.GetLogsAsync(StorageTestChannelName, limit, retrievedLogs).GetAwaiter().GetResult(); CollectionAssert.AreEquivalent(addedLogs, retrievedLogs); } @@ -106,7 +106,7 @@ public void GetLogsLowLimit() var limit = 3; var addedLogs = PutNLogs(numLogsToAdd); var retrievedLogs = new List(); - _storage.GetLogsAsync(StorageTestChannelName, limit, retrievedLogs).RunNotAsync(); + _storage.GetLogsAsync(StorageTestChannelName, limit, retrievedLogs).GetAwaiter().GetResult(); Assert.AreEqual(limit, retrievedLogs.Count); CollectionAssert.IsSubsetOf(retrievedLogs, addedLogs); } @@ -121,7 +121,7 @@ public void GetLogsHighLimit() var limit = 7; var addedLogs = PutNLogs(numLogsToAdd); var retrievedLogs = new List(); - _storage.GetLogsAsync(StorageTestChannelName, limit, retrievedLogs).RunNotAsync(); + _storage.GetLogsAsync(StorageTestChannelName, limit, retrievedLogs).GetAwaiter().GetResult(); CollectionAssert.AreEquivalent(retrievedLogs, addedLogs); } @@ -135,7 +135,7 @@ public void GetLogsHasBatchId() var limit = numLogsToAdd; var addedLogs = PutNLogs(numLogsToAdd); var retrievedLogs = new List(); - var batchId = _storage.GetLogsAsync(StorageTestChannelName, limit, retrievedLogs).RunNotAsync(); + var batchId = _storage.GetLogsAsync(StorageTestChannelName, limit, retrievedLogs).GetAwaiter().GetResult(); Assert.IsNotNull(batchId); } @@ -149,7 +149,7 @@ public void GetNoLogsHasNoBatchId() var limit = numLogsToAdd; var addedLogs = PutNLogs(numLogsToAdd); var retrievedLogs = new List(); - var batchId = _storage.GetLogsAsync(StorageTestChannelName, limit, retrievedLogs).RunNotAsync(); + var batchId = _storage.GetLogsAsync(StorageTestChannelName, limit, retrievedLogs).GetAwaiter().GetResult(); Assert.IsNull(batchId); } @@ -164,8 +164,8 @@ public void GetDuplicateLogs() var addedLogs = PutNLogs(numLogsToAdd); var retrievedLogsFirstTry = new List(); var retrievedLogsSecondTry = new List(); - _storage.GetLogsAsync(StorageTestChannelName, limit, retrievedLogsFirstTry).RunNotAsync(); - _storage.GetLogsAsync(StorageTestChannelName, limit, retrievedLogsSecondTry).RunNotAsync(); + _storage.GetLogsAsync(StorageTestChannelName, limit, retrievedLogsFirstTry).GetAwaiter().GetResult(); + _storage.GetLogsAsync(StorageTestChannelName, limit, retrievedLogsSecondTry).GetAwaiter().GetResult(); CollectionAssert.AreEquivalent(addedLogs, retrievedLogsFirstTry); Assert.AreEqual(0, retrievedLogsSecondTry.Count); } @@ -179,7 +179,7 @@ public void GetLogsFromChannelWithSimilarNames() var fakeChannelName = StorageTestChannelName.Substring(0, StorageTestChannelName.Length - 1); _storage.PutLog(StorageTestChannelName, TestLog.CreateTestLog()); var retrievedLogs = new List(); - var batchId = _storage.GetLogsAsync(fakeChannelName, 1, retrievedLogs).RunNotAsync(); + var batchId = _storage.GetLogsAsync(fakeChannelName, 1, retrievedLogs).GetAwaiter().GetResult(); Assert.IsNull(batchId); } @@ -194,9 +194,9 @@ public void ClearPendingState() var addedLogs = PutNLogs(numLogsToAdd); var retrievedLogsFirstTry = new List(); var retrievedLogsSecondTry = new List(); - _storage.GetLogsAsync(StorageTestChannelName, limit, retrievedLogsFirstTry).RunNotAsync(); + _storage.GetLogsAsync(StorageTestChannelName, limit, retrievedLogsFirstTry).GetAwaiter().GetResult(); _storage.ClearPendingLogState(StorageTestChannelName); - _storage.GetLogsAsync(StorageTestChannelName, limit, retrievedLogsSecondTry).RunNotAsync(); + _storage.GetLogsAsync(StorageTestChannelName, limit, retrievedLogsSecondTry).GetAwaiter().GetResult(); CollectionAssert.AreEquivalent(addedLogs, retrievedLogsFirstTry); CollectionAssert.AreEquivalent(addedLogs, retrievedLogsSecondTry); } @@ -212,11 +212,11 @@ public void FailToGetALog() // Perform an arbitrary operation and wait on it to complete so that database is free when invalid log // is inserted. - _storage.CountLogsAsync(StorageTestChannelName).RunNotAsync(); + _storage.CountLogsAsync(StorageTestChannelName).GetAwaiter().GetResult(); connection.Insert(invalidLogEntry); var logs = new List(); - var batchId = _storage.GetLogsAsync(StorageTestChannelName, 4, logs).RunNotAsync(); - var count = _storage.CountLogsAsync(StorageTestChannelName).RunNotAsync(); + var batchId = _storage.GetLogsAsync(StorageTestChannelName, 4, logs).GetAwaiter().GetResult(); + var count = _storage.CountLogsAsync(StorageTestChannelName).GetAwaiter().GetResult(); Assert.IsNull(batchId); Assert.AreEqual(0, logs.Count); Assert.AreEqual(0, count); diff --git a/Tests/Microsoft.AppCenter.Test.Windows/TaskExtension.cs b/Tests/Microsoft.AppCenter.Test.Windows/TaskExtension.cs index 0b1732ee4..7cfde5778 100644 --- a/Tests/Microsoft.AppCenter.Test.Windows/TaskExtension.cs +++ b/Tests/Microsoft.AppCenter.Test.Windows/TaskExtension.cs @@ -6,15 +6,6 @@ namespace Microsoft.AppCenter.Test { public static class TaskExtension { - public static T RunNotAsync(this Task @this) - { - return @this.GetAwaiter().GetResult(); - } - public static void RunNotAsync(this Task @this) - { - @this.GetAwaiter().GetResult(); - } - public static Task GetCompletedTask() { var completedTask = Task.Delay(0); From f12603da9730c2fa20d6ee211094ea7e6c8fb827 Mon Sep 17 00:00:00 2001 From: Guillaume Perrot Date: Wed, 28 Feb 2018 11:25:55 -0800 Subject: [PATCH 06/46] Bump version --- Apps/Contoso.Android.Puppet/Properties/AndroidManifest.xml | 2 +- Apps/Contoso.Android.Puppet/Properties/AssemblyInfo.cs | 4 ++-- .../Contoso.Forms.Puppet.Droid/Properties/AndroidManifest.xml | 2 +- .../Contoso.Forms.Puppet.Droid/Properties/AssemblyInfo.cs | 4 ++-- .../Contoso.Forms.Puppet.UWP/Package.appxmanifest | 2 +- .../Contoso.Forms.Puppet.UWP/Properties/AssemblyInfo.cs | 2 +- Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet.iOS/Info.plist | 4 ++-- .../Contoso.Forms.Puppet/Properties/AssemblyInfo.cs | 4 ++-- Apps/Contoso.UWP.Puppet/Package.appxmanifest | 2 +- Apps/Contoso.UWP.Puppet/Properties/AssemblyInfo.cs | 2 +- Apps/Contoso.WPF.Puppet/Properties/AssemblyInfo.cs | 4 ++-- Apps/Contoso.WinForms.Puppet/Properties/AssemblyInfo.cs | 4 ++-- Apps/Contoso.iOS.Puppet/Info.plist | 4 ++-- .../Properties/AssemblyInfo.cs | 4 ++-- .../Microsoft.AppCenter.Android/Properties/AssemblyInfo.cs | 4 ++-- SDK/AppCenter/Microsoft.AppCenter.Shared/WrapperSdk.cs | 2 +- .../Microsoft.AppCenter.UWP/Properties/AssemblyInfo.cs | 4 ++-- .../Properties/AssemblyInfo.cs | 4 ++-- .../Properties/AssemblyInfo.cs | 4 ++-- .../Microsoft.AppCenter.iOS/Properties/AssemblyInfo.cs | 4 ++-- SDK/AppCenter/Microsoft.AppCenter/Microsoft.AppCenter.csproj | 4 ++-- .../Properties/AssemblyInfo.cs | 4 ++-- .../Properties/AssemblyInfo.cs | 4 ++-- .../Properties/AssemblyInfo.cs | 4 ++-- .../Properties/AssemblyInfo.cs | 4 ++-- .../Properties/AssemblyInfo.cs | 4 ++-- .../Properties/AssemblyInfo.cs | 4 ++-- .../Microsoft.AppCenter.Analytics.csproj | 4 ++-- .../Properties/AssemblyInfo.cs | 4 ++-- .../Properties/AssemblyInfo.cs | 4 ++-- .../Properties/AssemblyInfo.cs | 4 ++-- .../Properties/AssemblyInfo.cs | 4 ++-- .../Properties/AssemblyInfo.cs | 4 ++-- .../Properties/AssemblyInfo.cs | 4 ++-- .../Microsoft.AppCenter.Crashes.csproj | 4 ++-- .../Properties/AssemblyInfo.cs | 4 ++-- .../Properties/AssemblyInfo.cs | 4 ++-- .../Properties/AssemblyInfo.cs | 4 ++-- .../Properties/AssemblyInfo.cs | 4 ++-- .../Microsoft.AppCenter.Distribute.csproj | 4 ++-- .../Properties/AssemblyInfo.cs | 4 ++-- .../Properties/AssemblyInfo.cs | 4 ++-- .../Microsoft.AppCenter.Push.UWP/Properties/AssemblyInfo.cs | 2 +- .../Properties/AssemblyInfo.cs | 4 ++-- .../Microsoft.AppCenter.Push.iOS/Properties/AssemblyInfo.cs | 4 ++-- .../Microsoft.AppCenter.Push/Microsoft.AppCenter.Push.csproj | 4 ++-- .../Properties/AssemblyInfo.cs | 4 ++-- .../Microsoft.AppCenter.Rum.UWP/Properties/AssemblyInfo.cs | 2 +- .../Microsoft.AppCenter.Rum/Microsoft.AppCenter.Rum.csproj | 4 ++-- Tests/Contoso.Forms.Test/Properties/AssemblyInfo.cs | 4 ++-- Tests/Droid/Properties/AndroidManifest.xml | 2 +- Tests/Droid/Properties/AssemblyInfo.cs | 4 ++-- .../Properties/AssemblyInfo.cs | 4 ++-- .../Properties/AssemblyInfo.cs | 4 ++-- Tests/Microsoft.AppCenter.NET/Properties/AssemblyInfo.cs | 4 ++-- Tests/Microsoft.AppCenter.Push.NET/Properties/AssemblyInfo.cs | 2 +- .../Properties/AssemblyInfo.cs | 2 +- Tests/Microsoft.AppCenter.Test.UWP/Package.appxmanifest | 2 +- Tests/Microsoft.AppCenter.Test.UWP/Properties/AssemblyInfo.cs | 2 +- .../Properties/AssemblyInfo.cs | 4 ++-- .../Properties/AssemblyInfo.cs | 2 +- Tests/iOS/Info.plist | 4 ++-- scripts/configuration/ac-build-config.xml | 2 +- 63 files changed, 110 insertions(+), 110 deletions(-) diff --git a/Apps/Contoso.Android.Puppet/Properties/AndroidManifest.xml b/Apps/Contoso.Android.Puppet/Properties/AndroidManifest.xml index 56bdeabaa..7b5b10b44 100644 --- a/Apps/Contoso.Android.Puppet/Properties/AndroidManifest.xml +++ b/Apps/Contoso.Android.Puppet/Properties/AndroidManifest.xml @@ -1,5 +1,5 @@ - + diff --git a/Apps/Contoso.Android.Puppet/Properties/AssemblyInfo.cs b/Apps/Contoso.Android.Puppet/Properties/AssemblyInfo.cs index 1133ae393..54ce2346b 100644 --- a/Apps/Contoso.Android.Puppet/Properties/AssemblyInfo.cs +++ b/Apps/Contoso.Android.Puppet/Properties/AssemblyInfo.cs @@ -25,5 +25,5 @@ // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("0.0.0.0")] -[assembly: AssemblyFileVersion("1.5.0.0")] -[assembly: AssemblyInformationalVersion("1.5.0-SNAPSHOT")] +[assembly: AssemblyFileVersion("1.5.1.0")] +[assembly: AssemblyInformationalVersion("1.5.1-SNAPSHOT")] diff --git a/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet.Droid/Properties/AndroidManifest.xml b/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet.Droid/Properties/AndroidManifest.xml index a51c6b0ad..f6a19c7fe 100644 --- a/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet.Droid/Properties/AndroidManifest.xml +++ b/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet.Droid/Properties/AndroidManifest.xml @@ -1,5 +1,5 @@ - + diff --git a/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet.Droid/Properties/AssemblyInfo.cs b/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet.Droid/Properties/AssemblyInfo.cs index c05b2aefb..9ed9d6bc1 100644 --- a/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet.Droid/Properties/AssemblyInfo.cs +++ b/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet.Droid/Properties/AssemblyInfo.cs @@ -19,8 +19,8 @@ // and "{Major}.{Minor}.{Build}.*" will update just the revision. [assembly: AssemblyVersion("0.0.0.0")] -[assembly: AssemblyFileVersion("1.5.0.0")] -[assembly: AssemblyInformationalVersion("1.5.0-SNAPSHOT")] +[assembly: AssemblyFileVersion("1.5.1.0")] +[assembly: AssemblyInformationalVersion("1.5.1-SNAPSHOT")] // The following attributes are used to specify the signing key for the assembly, // if desired. See the Mono documentation for more information about signing. diff --git a/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet.UWP/Package.appxmanifest b/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet.UWP/Package.appxmanifest index dba6d9a15..a7759c41f 100644 --- a/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet.UWP/Package.appxmanifest +++ b/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet.UWP/Package.appxmanifest @@ -1,6 +1,6 @@ - + AppCenter-Contoso.Forms.Puppet.UWP diff --git a/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet.UWP/Properties/AssemblyInfo.cs b/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet.UWP/Properties/AssemblyInfo.cs index f24b5d2a3..1aa371c9c 100644 --- a/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet.UWP/Properties/AssemblyInfo.cs +++ b/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet.UWP/Properties/AssemblyInfo.cs @@ -24,5 +24,5 @@ // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("0.0.0.0")] -[assembly: AssemblyFileVersion("1.5.0.0")] +[assembly: AssemblyFileVersion("1.5.1.0")] [assembly: ComVisible(false)] diff --git a/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet.iOS/Info.plist b/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet.iOS/Info.plist index 870aee578..11f9d5c57 100644 --- a/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet.iOS/Info.plist +++ b/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet.iOS/Info.plist @@ -5,9 +5,9 @@ CFBundleIdentifier com.microsoft.appcenter.xamarin.forms.puppet CFBundleShortVersionString - 1.5.0 + 1.5.1 CFBundleVersion - 1.5.0 + 1.5.1 LSRequiresIPhoneOS MinimumOSVersion diff --git a/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet/Properties/AssemblyInfo.cs b/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet/Properties/AssemblyInfo.cs index 39af58350..ab59978ae 100644 --- a/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet/Properties/AssemblyInfo.cs +++ b/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet/Properties/AssemblyInfo.cs @@ -17,8 +17,8 @@ // and "{Major}.{Minor}.{Build}.*" will update just the revision. [assembly: AssemblyVersion("0.0.0.0")] -[assembly: AssemblyFileVersion("1.5.0.0")] -[assembly: AssemblyInformationalVersion("1.5.0-SNAPSHOT")] +[assembly: AssemblyFileVersion("1.5.1.0")] +[assembly: AssemblyInformationalVersion("1.5.1-SNAPSHOT")] // The following attributes are used to specify the signing key for the assembly, // if desired. See the Mono documentation for more information about signing. diff --git a/Apps/Contoso.UWP.Puppet/Package.appxmanifest b/Apps/Contoso.UWP.Puppet/Package.appxmanifest index 42c768fb2..02c1f6ea9 100644 --- a/Apps/Contoso.UWP.Puppet/Package.appxmanifest +++ b/Apps/Contoso.UWP.Puppet/Package.appxmanifest @@ -1,6 +1,6 @@ - + AppCenter-Contoso.UWP.Puppet diff --git a/Apps/Contoso.UWP.Puppet/Properties/AssemblyInfo.cs b/Apps/Contoso.UWP.Puppet/Properties/AssemblyInfo.cs index adee8c654..3e874b4b0 100644 --- a/Apps/Contoso.UWP.Puppet/Properties/AssemblyInfo.cs +++ b/Apps/Contoso.UWP.Puppet/Properties/AssemblyInfo.cs @@ -24,5 +24,5 @@ // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("0.0.0.0")] -[assembly: AssemblyFileVersion("1.5.0.0")] +[assembly: AssemblyFileVersion("1.5.1.0")] [assembly: ComVisible(false)] \ No newline at end of file diff --git a/Apps/Contoso.WPF.Puppet/Properties/AssemblyInfo.cs b/Apps/Contoso.WPF.Puppet/Properties/AssemblyInfo.cs index ba8d249ee..9c17a92c0 100644 --- a/Apps/Contoso.WPF.Puppet/Properties/AssemblyInfo.cs +++ b/Apps/Contoso.WPF.Puppet/Properties/AssemblyInfo.cs @@ -27,5 +27,5 @@ // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("0.0.0.0")] -[assembly: AssemblyFileVersion("1.5.0.0")] -[assembly: AssemblyInformationalVersion("1.5.0-SNAPSHOT")] +[assembly: AssemblyFileVersion("1.5.1.0")] +[assembly: AssemblyInformationalVersion("1.5.1-SNAPSHOT")] diff --git a/Apps/Contoso.WinForms.Puppet/Properties/AssemblyInfo.cs b/Apps/Contoso.WinForms.Puppet/Properties/AssemblyInfo.cs index d98088941..0006e1170 100644 --- a/Apps/Contoso.WinForms.Puppet/Properties/AssemblyInfo.cs +++ b/Apps/Contoso.WinForms.Puppet/Properties/AssemblyInfo.cs @@ -25,5 +25,5 @@ // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("0.0.0.0")] -[assembly: AssemblyFileVersion("1.5.0.0")] -[assembly: AssemblyInformationalVersion("1.5.0-SNAPSHOT")] +[assembly: AssemblyFileVersion("1.5.1.0")] +[assembly: AssemblyInformationalVersion("1.5.1-SNAPSHOT")] diff --git a/Apps/Contoso.iOS.Puppet/Info.plist b/Apps/Contoso.iOS.Puppet/Info.plist index df36ae1c2..489ebaaed 100644 --- a/Apps/Contoso.iOS.Puppet/Info.plist +++ b/Apps/Contoso.iOS.Puppet/Info.plist @@ -7,9 +7,9 @@ CFBundleIdentifier com.microsoft.appcenter.xamarin.puppet CFBundleShortVersionString - 1.5.0 + 1.5.1 CFBundleVersion - 1.5.0 + 1.5.1 LSRequiresIPhoneOS MinimumOSVersion diff --git a/SDK/AppCenter/Microsoft.AppCenter.Android.Bindings/Properties/AssemblyInfo.cs b/SDK/AppCenter/Microsoft.AppCenter.Android.Bindings/Properties/AssemblyInfo.cs index 72271c7b2..ee844a7d5 100644 --- a/SDK/AppCenter/Microsoft.AppCenter.Android.Bindings/Properties/AssemblyInfo.cs +++ b/SDK/AppCenter/Microsoft.AppCenter.Android.Bindings/Properties/AssemblyInfo.cs @@ -26,5 +26,5 @@ // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("0.0.0.0")] -[assembly: AssemblyFileVersion("1.5.0.0")] -[assembly: AssemblyInformationalVersion("1.5.0-SNAPSHOT")] +[assembly: AssemblyFileVersion("1.5.1.0")] +[assembly: AssemblyInformationalVersion("1.5.1-SNAPSHOT")] diff --git a/SDK/AppCenter/Microsoft.AppCenter.Android/Properties/AssemblyInfo.cs b/SDK/AppCenter/Microsoft.AppCenter.Android/Properties/AssemblyInfo.cs index ae27cc369..c47365b4a 100644 --- a/SDK/AppCenter/Microsoft.AppCenter.Android/Properties/AssemblyInfo.cs +++ b/SDK/AppCenter/Microsoft.AppCenter.Android/Properties/AssemblyInfo.cs @@ -25,5 +25,5 @@ // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("0.0.0.0")] -[assembly: AssemblyFileVersion("1.5.0.0")] -[assembly: AssemblyInformationalVersion("1.5.0-SNAPSHOT")] +[assembly: AssemblyFileVersion("1.5.1.0")] +[assembly: AssemblyInformationalVersion("1.5.1-SNAPSHOT")] diff --git a/SDK/AppCenter/Microsoft.AppCenter.Shared/WrapperSdk.cs b/SDK/AppCenter/Microsoft.AppCenter.Shared/WrapperSdk.cs index ac17cedb0..4e4f673d3 100644 --- a/SDK/AppCenter/Microsoft.AppCenter.Shared/WrapperSdk.cs +++ b/SDK/AppCenter/Microsoft.AppCenter.Shared/WrapperSdk.cs @@ -5,6 +5,6 @@ public static class WrapperSdk public const string Name = "appcenter.xamarin"; /* We can't use reflection for assemblyInformationalVersion on iOS with "Link All" optimization. */ - internal const string Version = "1.5.0-SNAPSHOT"; + internal const string Version = "1.5.1-SNAPSHOT"; } } diff --git a/SDK/AppCenter/Microsoft.AppCenter.UWP/Properties/AssemblyInfo.cs b/SDK/AppCenter/Microsoft.AppCenter.UWP/Properties/AssemblyInfo.cs index 3906102b1..73fac4b5f 100644 --- a/SDK/AppCenter/Microsoft.AppCenter.UWP/Properties/AssemblyInfo.cs +++ b/SDK/AppCenter/Microsoft.AppCenter.UWP/Properties/AssemblyInfo.cs @@ -25,7 +25,7 @@ // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("0.0.0.0")] -[assembly: AssemblyFileVersion("1.5.0.0")] -[assembly: AssemblyInformationalVersion("1.5.0-SNAPSHOT")] +[assembly: AssemblyFileVersion("1.5.1.0")] +[assembly: AssemblyInformationalVersion("1.5.1-SNAPSHOT")] [assembly: ComVisible(false)] [assembly: InternalsVisibleTo("Microsoft.AppCenter.Test.UWP")] \ No newline at end of file diff --git a/SDK/AppCenter/Microsoft.AppCenter.WindowsDesktop/Properties/AssemblyInfo.cs b/SDK/AppCenter/Microsoft.AppCenter.WindowsDesktop/Properties/AssemblyInfo.cs index eabe1e994..613b8805e 100644 --- a/SDK/AppCenter/Microsoft.AppCenter.WindowsDesktop/Properties/AssemblyInfo.cs +++ b/SDK/AppCenter/Microsoft.AppCenter.WindowsDesktop/Properties/AssemblyInfo.cs @@ -25,6 +25,6 @@ // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("0.0.0.0")] -[assembly: AssemblyFileVersion("1.5.0.0")] -[assembly: AssemblyInformationalVersion("1.5.0-SNAPSHOT")] +[assembly: AssemblyFileVersion("1.5.1.0")] +[assembly: AssemblyInformationalVersion("1.5.1-SNAPSHOT")] [assembly: InternalsVisibleTo("Microsoft.AppCenter.Test.WindowsDesktop")] diff --git a/SDK/AppCenter/Microsoft.AppCenter.iOS.Bindings/Properties/AssemblyInfo.cs b/SDK/AppCenter/Microsoft.AppCenter.iOS.Bindings/Properties/AssemblyInfo.cs index 6077750c9..45d1255a4 100644 --- a/SDK/AppCenter/Microsoft.AppCenter.iOS.Bindings/Properties/AssemblyInfo.cs +++ b/SDK/AppCenter/Microsoft.AppCenter.iOS.Bindings/Properties/AssemblyInfo.cs @@ -31,5 +31,5 @@ // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("0.0.0.0")] -[assembly: AssemblyFileVersion("1.5.0.0")] -[assembly: AssemblyInformationalVersion("1.5.0-SNAPSHOT")] +[assembly: AssemblyFileVersion("1.5.1.0")] +[assembly: AssemblyInformationalVersion("1.5.1-SNAPSHOT")] diff --git a/SDK/AppCenter/Microsoft.AppCenter.iOS/Properties/AssemblyInfo.cs b/SDK/AppCenter/Microsoft.AppCenter.iOS/Properties/AssemblyInfo.cs index d27052787..257b70534 100644 --- a/SDK/AppCenter/Microsoft.AppCenter.iOS/Properties/AssemblyInfo.cs +++ b/SDK/AppCenter/Microsoft.AppCenter.iOS/Properties/AssemblyInfo.cs @@ -23,5 +23,5 @@ // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("0.0.0.0")] -[assembly: AssemblyFileVersion("1.5.0.0")] -[assembly: AssemblyInformationalVersion("1.5.0-SNAPSHOT")] +[assembly: AssemblyFileVersion("1.5.1.0")] +[assembly: AssemblyInformationalVersion("1.5.1-SNAPSHOT")] diff --git a/SDK/AppCenter/Microsoft.AppCenter/Microsoft.AppCenter.csproj b/SDK/AppCenter/Microsoft.AppCenter/Microsoft.AppCenter.csproj index aa5cae859..0754c44d6 100644 --- a/SDK/AppCenter/Microsoft.AppCenter/Microsoft.AppCenter.csproj +++ b/SDK/AppCenter/Microsoft.AppCenter/Microsoft.AppCenter.csproj @@ -7,9 +7,9 @@ Microsoft Corp. All rights reserved. Microsoft.AppCenter.Core Microsoft Corporation - 1.5.0-SNAPSHOT + 1.5.1-SNAPSHOT 0.0.0.0 - 1.5.0.0 + 1.5.1.0 Microsoft.AppCenter.Core diff --git a/SDK/AppCenterAnalytics/Microsoft.AppCenter.Analytics.Android.Bindings/Properties/AssemblyInfo.cs b/SDK/AppCenterAnalytics/Microsoft.AppCenter.Analytics.Android.Bindings/Properties/AssemblyInfo.cs index 9b2c22725..19d6898aa 100644 --- a/SDK/AppCenterAnalytics/Microsoft.AppCenter.Analytics.Android.Bindings/Properties/AssemblyInfo.cs +++ b/SDK/AppCenterAnalytics/Microsoft.AppCenter.Analytics.Android.Bindings/Properties/AssemblyInfo.cs @@ -18,8 +18,8 @@ // and "{Major}.{Minor}.{Build}.*" will update just the revision. [assembly: AssemblyVersion("0.0.0.0")] -[assembly: AssemblyFileVersion("1.5.0.0")] -[assembly: AssemblyInformationalVersion("1.5.0-SNAPSHOT")] +[assembly: AssemblyFileVersion("1.5.1.0")] +[assembly: AssemblyInformationalVersion("1.5.1-SNAPSHOT")] // The following attributes are used to specify the signing key for the assembly, // if desired. See the Mono documentation for more information about signing. diff --git a/SDK/AppCenterAnalytics/Microsoft.AppCenter.Analytics.Android/Properties/AssemblyInfo.cs b/SDK/AppCenterAnalytics/Microsoft.AppCenter.Analytics.Android/Properties/AssemblyInfo.cs index 36501de29..e20766948 100644 --- a/SDK/AppCenterAnalytics/Microsoft.AppCenter.Analytics.Android/Properties/AssemblyInfo.cs +++ b/SDK/AppCenterAnalytics/Microsoft.AppCenter.Analytics.Android/Properties/AssemblyInfo.cs @@ -25,5 +25,5 @@ // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("0.0.0.0")] -[assembly: AssemblyFileVersion("1.5.0.0")] -[assembly: AssemblyInformationalVersion("1.5.0-SNAPSHOT")] +[assembly: AssemblyFileVersion("1.5.1.0")] +[assembly: AssemblyInformationalVersion("1.5.1-SNAPSHOT")] diff --git a/SDK/AppCenterAnalytics/Microsoft.AppCenter.Analytics.UWP/Properties/AssemblyInfo.cs b/SDK/AppCenterAnalytics/Microsoft.AppCenter.Analytics.UWP/Properties/AssemblyInfo.cs index 9c0e896d2..6d93db2e4 100644 --- a/SDK/AppCenterAnalytics/Microsoft.AppCenter.Analytics.UWP/Properties/AssemblyInfo.cs +++ b/SDK/AppCenterAnalytics/Microsoft.AppCenter.Analytics.UWP/Properties/AssemblyInfo.cs @@ -29,6 +29,6 @@ // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("0.0.0.0")] -[assembly: AssemblyInformationalVersion("1.5.0-SNAPSHOT")] -[assembly: AssemblyFileVersion("1.5.0.0")] +[assembly: AssemblyInformationalVersion("1.5.1-SNAPSHOT")] +[assembly: AssemblyFileVersion("1.5.1.0")] [assembly: ComVisible(false)] diff --git a/SDK/AppCenterAnalytics/Microsoft.AppCenter.Analytics.WindowsDesktop/Properties/AssemblyInfo.cs b/SDK/AppCenterAnalytics/Microsoft.AppCenter.Analytics.WindowsDesktop/Properties/AssemblyInfo.cs index c9607f898..cbf274dc9 100644 --- a/SDK/AppCenterAnalytics/Microsoft.AppCenter.Analytics.WindowsDesktop/Properties/AssemblyInfo.cs +++ b/SDK/AppCenterAnalytics/Microsoft.AppCenter.Analytics.WindowsDesktop/Properties/AssemblyInfo.cs @@ -23,5 +23,5 @@ // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("0.0.0.0")] -[assembly: AssemblyFileVersion("1.5.0.0")] -[assembly: AssemblyInformationalVersion("1.5.0-SNAPSHOT")] +[assembly: AssemblyFileVersion("1.5.1.0")] +[assembly: AssemblyInformationalVersion("1.5.1-SNAPSHOT")] diff --git a/SDK/AppCenterAnalytics/Microsoft.AppCenter.Analytics.iOS.Bindings/Properties/AssemblyInfo.cs b/SDK/AppCenterAnalytics/Microsoft.AppCenter.Analytics.iOS.Bindings/Properties/AssemblyInfo.cs index ae286e67f..3f4d7fbdf 100644 --- a/SDK/AppCenterAnalytics/Microsoft.AppCenter.Analytics.iOS.Bindings/Properties/AssemblyInfo.cs +++ b/SDK/AppCenterAnalytics/Microsoft.AppCenter.Analytics.iOS.Bindings/Properties/AssemblyInfo.cs @@ -30,5 +30,5 @@ // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("0.0.0.0")] -[assembly: AssemblyFileVersion("1.5.0.0")] -[assembly: AssemblyInformationalVersion("1.5.0-SNAPSHOT")] +[assembly: AssemblyFileVersion("1.5.1.0")] +[assembly: AssemblyInformationalVersion("1.5.1-SNAPSHOT")] diff --git a/SDK/AppCenterAnalytics/Microsoft.AppCenter.Analytics.iOS/Properties/AssemblyInfo.cs b/SDK/AppCenterAnalytics/Microsoft.AppCenter.Analytics.iOS/Properties/AssemblyInfo.cs index a1ead50ca..b224abe30 100644 --- a/SDK/AppCenterAnalytics/Microsoft.AppCenter.Analytics.iOS/Properties/AssemblyInfo.cs +++ b/SDK/AppCenterAnalytics/Microsoft.AppCenter.Analytics.iOS/Properties/AssemblyInfo.cs @@ -23,5 +23,5 @@ // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("0.0.0.0")] -[assembly: AssemblyFileVersion("1.5.0.0")] -[assembly: AssemblyInformationalVersion("1.5.0-SNAPSHOT")] +[assembly: AssemblyFileVersion("1.5.1.0")] +[assembly: AssemblyInformationalVersion("1.5.1-SNAPSHOT")] diff --git a/SDK/AppCenterAnalytics/Microsoft.AppCenter.Analytics/Microsoft.AppCenter.Analytics.csproj b/SDK/AppCenterAnalytics/Microsoft.AppCenter.Analytics/Microsoft.AppCenter.Analytics.csproj index e7a6da969..a153023b8 100644 --- a/SDK/AppCenterAnalytics/Microsoft.AppCenter.Analytics/Microsoft.AppCenter.Analytics.csproj +++ b/SDK/AppCenterAnalytics/Microsoft.AppCenter.Analytics/Microsoft.AppCenter.Analytics.csproj @@ -6,9 +6,9 @@ Microsoft Corp. All rights reserved. Microsoft.AppCenter.Analytics Microsoft Corporation - 1.5.0-SNAPSHOT + 1.5.1-SNAPSHOT 0.0.0.0 - 1.5.0.0 + 1.5.1.0 Microsoft.AppCenter.Analytics diff --git a/SDK/AppCenterCrashes/Microsoft.AppCenter.Crashes.Android.Bindings/Properties/AssemblyInfo.cs b/SDK/AppCenterCrashes/Microsoft.AppCenter.Crashes.Android.Bindings/Properties/AssemblyInfo.cs index 489769886..d7b757bcf 100644 --- a/SDK/AppCenterCrashes/Microsoft.AppCenter.Crashes.Android.Bindings/Properties/AssemblyInfo.cs +++ b/SDK/AppCenterCrashes/Microsoft.AppCenter.Crashes.Android.Bindings/Properties/AssemblyInfo.cs @@ -17,8 +17,8 @@ // and "{Major}.{Minor}.{Build}.*" will update just the revision. [assembly: AssemblyVersion("0.0.0.0")] -[assembly: AssemblyFileVersion("1.5.0.0")] -[assembly: AssemblyInformationalVersion("1.5.0-SNAPSHOT")] +[assembly: AssemblyFileVersion("1.5.1.0")] +[assembly: AssemblyInformationalVersion("1.5.1-SNAPSHOT")] // The following attributes are used to specify the signing key for the assembly, // if desired. See the Mono documentation for more information about signing. diff --git a/SDK/AppCenterCrashes/Microsoft.AppCenter.Crashes.Android/Properties/AssemblyInfo.cs b/SDK/AppCenterCrashes/Microsoft.AppCenter.Crashes.Android/Properties/AssemblyInfo.cs index 406719400..04a676834 100644 --- a/SDK/AppCenterCrashes/Microsoft.AppCenter.Crashes.Android/Properties/AssemblyInfo.cs +++ b/SDK/AppCenterCrashes/Microsoft.AppCenter.Crashes.Android/Properties/AssemblyInfo.cs @@ -26,5 +26,5 @@ // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("0.0.0.0")] -[assembly: AssemblyFileVersion("1.5.0.0")] -[assembly: AssemblyInformationalVersion("1.5.0-SNAPSHOT")] +[assembly: AssemblyFileVersion("1.5.1.0")] +[assembly: AssemblyInformationalVersion("1.5.1-SNAPSHOT")] diff --git a/SDK/AppCenterCrashes/Microsoft.AppCenter.Crashes.UWP/Properties/AssemblyInfo.cs b/SDK/AppCenterCrashes/Microsoft.AppCenter.Crashes.UWP/Properties/AssemblyInfo.cs index 9f95d2dc1..5884f2e87 100644 --- a/SDK/AppCenterCrashes/Microsoft.AppCenter.Crashes.UWP/Properties/AssemblyInfo.cs +++ b/SDK/AppCenterCrashes/Microsoft.AppCenter.Crashes.UWP/Properties/AssemblyInfo.cs @@ -29,6 +29,6 @@ // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("0.0.0.0")] -[assembly: AssemblyFileVersion("1.5.0.0")] -[assembly: AssemblyInformationalVersion("1.5.0-SNAPSHOT")] +[assembly: AssemblyFileVersion("1.5.1.0")] +[assembly: AssemblyInformationalVersion("1.5.1-SNAPSHOT")] [assembly: ComVisible(false)] \ No newline at end of file diff --git a/SDK/AppCenterCrashes/Microsoft.AppCenter.Crashes.WindowsDesktop/Properties/AssemblyInfo.cs b/SDK/AppCenterCrashes/Microsoft.AppCenter.Crashes.WindowsDesktop/Properties/AssemblyInfo.cs index 4c3bbbe86..e70bdb2ae 100644 --- a/SDK/AppCenterCrashes/Microsoft.AppCenter.Crashes.WindowsDesktop/Properties/AssemblyInfo.cs +++ b/SDK/AppCenterCrashes/Microsoft.AppCenter.Crashes.WindowsDesktop/Properties/AssemblyInfo.cs @@ -24,5 +24,5 @@ // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("0.0.0.0")] -[assembly: AssemblyFileVersion("1.5.0.0")] -[assembly: AssemblyInformationalVersion("1.5.0-SNAPSHOT")] +[assembly: AssemblyFileVersion("1.5.1.0")] +[assembly: AssemblyInformationalVersion("1.5.1-SNAPSHOT")] diff --git a/SDK/AppCenterCrashes/Microsoft.AppCenter.Crashes.iOS.Bindings/Properties/AssemblyInfo.cs b/SDK/AppCenterCrashes/Microsoft.AppCenter.Crashes.iOS.Bindings/Properties/AssemblyInfo.cs index 50f7a8a02..b008dfb63 100644 --- a/SDK/AppCenterCrashes/Microsoft.AppCenter.Crashes.iOS.Bindings/Properties/AssemblyInfo.cs +++ b/SDK/AppCenterCrashes/Microsoft.AppCenter.Crashes.iOS.Bindings/Properties/AssemblyInfo.cs @@ -30,5 +30,5 @@ // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("0.0.0.0")] -[assembly: AssemblyFileVersion("1.5.0.0")] -[assembly: AssemblyInformationalVersion("1.5.0-SNAPSHOT")] +[assembly: AssemblyFileVersion("1.5.1.0")] +[assembly: AssemblyInformationalVersion("1.5.1-SNAPSHOT")] diff --git a/SDK/AppCenterCrashes/Microsoft.AppCenter.Crashes.iOS/Properties/AssemblyInfo.cs b/SDK/AppCenterCrashes/Microsoft.AppCenter.Crashes.iOS/Properties/AssemblyInfo.cs index 4f6e5117b..2c81335ac 100644 --- a/SDK/AppCenterCrashes/Microsoft.AppCenter.Crashes.iOS/Properties/AssemblyInfo.cs +++ b/SDK/AppCenterCrashes/Microsoft.AppCenter.Crashes.iOS/Properties/AssemblyInfo.cs @@ -23,5 +23,5 @@ // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("0.0.0.0")] -[assembly: AssemblyFileVersion("1.5.0.0")] -[assembly: AssemblyInformationalVersion("1.5.0-SNAPSHOT")] +[assembly: AssemblyFileVersion("1.5.1.0")] +[assembly: AssemblyInformationalVersion("1.5.1-SNAPSHOT")] diff --git a/SDK/AppCenterCrashes/Microsoft.AppCenter.Crashes/Microsoft.AppCenter.Crashes.csproj b/SDK/AppCenterCrashes/Microsoft.AppCenter.Crashes/Microsoft.AppCenter.Crashes.csproj index d5610a217..8c2be2629 100644 --- a/SDK/AppCenterCrashes/Microsoft.AppCenter.Crashes/Microsoft.AppCenter.Crashes.csproj +++ b/SDK/AppCenterCrashes/Microsoft.AppCenter.Crashes/Microsoft.AppCenter.Crashes.csproj @@ -7,9 +7,9 @@ Microsoft Corp. All rights reserved. Microsoft.AppCenter.Crashes Microsoft Corporation - 1.5.0-SNAPSHOT + 1.5.1-SNAPSHOT 0.0.0.0 - 1.5.0.0 + 1.5.1.0 Microsoft.AppCenter.Crashes diff --git a/SDK/AppCenterDistribute/Microsoft.AppCenter.Distribute.Android.Bindings/Properties/AssemblyInfo.cs b/SDK/AppCenterDistribute/Microsoft.AppCenter.Distribute.Android.Bindings/Properties/AssemblyInfo.cs index 4d20fe458..688f65e99 100644 --- a/SDK/AppCenterDistribute/Microsoft.AppCenter.Distribute.Android.Bindings/Properties/AssemblyInfo.cs +++ b/SDK/AppCenterDistribute/Microsoft.AppCenter.Distribute.Android.Bindings/Properties/AssemblyInfo.cs @@ -17,8 +17,8 @@ // and "{Major}.{Minor}.{Build}.*" will update just the revision. [assembly: AssemblyVersion("0.0.0.0")] -[assembly: AssemblyFileVersion("1.5.0.0")] -[assembly: AssemblyInformationalVersion("1.5.0-SNAPSHOT")] +[assembly: AssemblyFileVersion("1.5.1.0")] +[assembly: AssemblyInformationalVersion("1.5.1-SNAPSHOT")] // The following attributes are used to specify the signing key for the assembly, // if desired. See the Mono documentation for more information about signing. diff --git a/SDK/AppCenterDistribute/Microsoft.AppCenter.Distribute.Android/Properties/AssemblyInfo.cs b/SDK/AppCenterDistribute/Microsoft.AppCenter.Distribute.Android/Properties/AssemblyInfo.cs index d1f224731..79541d446 100644 --- a/SDK/AppCenterDistribute/Microsoft.AppCenter.Distribute.Android/Properties/AssemblyInfo.cs +++ b/SDK/AppCenterDistribute/Microsoft.AppCenter.Distribute.Android/Properties/AssemblyInfo.cs @@ -25,5 +25,5 @@ // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("0.0.0.0")] -[assembly: AssemblyFileVersion("1.5.0.0")] -[assembly: AssemblyInformationalVersion("1.5.0-SNAPSHOT")] +[assembly: AssemblyFileVersion("1.5.1.0")] +[assembly: AssemblyInformationalVersion("1.5.1-SNAPSHOT")] diff --git a/SDK/AppCenterDistribute/Microsoft.AppCenter.Distribute.iOS.Bindings/Properties/AssemblyInfo.cs b/SDK/AppCenterDistribute/Microsoft.AppCenter.Distribute.iOS.Bindings/Properties/AssemblyInfo.cs index 3735b086e..9e88d1617 100644 --- a/SDK/AppCenterDistribute/Microsoft.AppCenter.Distribute.iOS.Bindings/Properties/AssemblyInfo.cs +++ b/SDK/AppCenterDistribute/Microsoft.AppCenter.Distribute.iOS.Bindings/Properties/AssemblyInfo.cs @@ -32,5 +32,5 @@ // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("0.0.0.0")] -[assembly: AssemblyFileVersion("1.5.0.0")] -[assembly: AssemblyInformationalVersion("1.5.0-SNAPSHOT")] +[assembly: AssemblyFileVersion("1.5.1.0")] +[assembly: AssemblyInformationalVersion("1.5.1-SNAPSHOT")] diff --git a/SDK/AppCenterDistribute/Microsoft.AppCenter.Distribute.iOS/Properties/AssemblyInfo.cs b/SDK/AppCenterDistribute/Microsoft.AppCenter.Distribute.iOS/Properties/AssemblyInfo.cs index bc2729b5d..fe7f3bf26 100644 --- a/SDK/AppCenterDistribute/Microsoft.AppCenter.Distribute.iOS/Properties/AssemblyInfo.cs +++ b/SDK/AppCenterDistribute/Microsoft.AppCenter.Distribute.iOS/Properties/AssemblyInfo.cs @@ -24,5 +24,5 @@ // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("0.0.0.0")] -[assembly: AssemblyFileVersion("1.5.0.0")] -[assembly: AssemblyInformationalVersion("1.5.0-SNAPSHOT")] +[assembly: AssemblyFileVersion("1.5.1.0")] +[assembly: AssemblyInformationalVersion("1.5.1-SNAPSHOT")] diff --git a/SDK/AppCenterDistribute/Microsoft.AppCenter.Distribute/Microsoft.AppCenter.Distribute.csproj b/SDK/AppCenterDistribute/Microsoft.AppCenter.Distribute/Microsoft.AppCenter.Distribute.csproj index a7e1d60c9..d60591414 100644 --- a/SDK/AppCenterDistribute/Microsoft.AppCenter.Distribute/Microsoft.AppCenter.Distribute.csproj +++ b/SDK/AppCenterDistribute/Microsoft.AppCenter.Distribute/Microsoft.AppCenter.Distribute.csproj @@ -7,9 +7,9 @@ Microsoft Corp. All rights reserved. Microsoft.AppCenter.Distribute Microsoft Corporation - 1.5.0-SNAPSHOT + 1.5.1-SNAPSHOT 0.0.0.0 - 1.5.0.0 + 1.5.1.0 Microsoft.AppCenter.Distribute diff --git a/SDK/AppCenterPush/Microsoft.AppCenter.Push.Android.Bindings/Properties/AssemblyInfo.cs b/SDK/AppCenterPush/Microsoft.AppCenter.Push.Android.Bindings/Properties/AssemblyInfo.cs index 9c2e702c0..7a7ff4397 100644 --- a/SDK/AppCenterPush/Microsoft.AppCenter.Push.Android.Bindings/Properties/AssemblyInfo.cs +++ b/SDK/AppCenterPush/Microsoft.AppCenter.Push.Android.Bindings/Properties/AssemblyInfo.cs @@ -24,5 +24,5 @@ // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("0.0.0.0")] -[assembly: AssemblyFileVersion("1.5.0.0")] -[assembly: AssemblyInformationalVersion("1.5.0-SNAPSHOT")] +[assembly: AssemblyFileVersion("1.5.1.0")] +[assembly: AssemblyInformationalVersion("1.5.1-SNAPSHOT")] diff --git a/SDK/AppCenterPush/Microsoft.AppCenter.Push.Android/Properties/AssemblyInfo.cs b/SDK/AppCenterPush/Microsoft.AppCenter.Push.Android/Properties/AssemblyInfo.cs index 2cb90cf4b..9a98e3ba2 100644 --- a/SDK/AppCenterPush/Microsoft.AppCenter.Push.Android/Properties/AssemblyInfo.cs +++ b/SDK/AppCenterPush/Microsoft.AppCenter.Push.Android/Properties/AssemblyInfo.cs @@ -24,5 +24,5 @@ // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("0.0.0.0")] -[assembly: AssemblyFileVersion("1.5.0.0")] -[assembly: AssemblyInformationalVersion("1.5.0-SNAPSHOT")] +[assembly: AssemblyFileVersion("1.5.1.0")] +[assembly: AssemblyInformationalVersion("1.5.1-SNAPSHOT")] diff --git a/SDK/AppCenterPush/Microsoft.AppCenter.Push.UWP/Properties/AssemblyInfo.cs b/SDK/AppCenterPush/Microsoft.AppCenter.Push.UWP/Properties/AssemblyInfo.cs index 8a29704dc..4f7672563 100644 --- a/SDK/AppCenterPush/Microsoft.AppCenter.Push.UWP/Properties/AssemblyInfo.cs +++ b/SDK/AppCenterPush/Microsoft.AppCenter.Push.UWP/Properties/AssemblyInfo.cs @@ -28,6 +28,6 @@ [assembly: ReferenceAssembly] #endif [assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.5.0.0")] +[assembly: AssemblyFileVersion("1.5.1.0")] [assembly: ComVisible(false)] [assembly: InternalsVisibleTo("Microsoft.AppCenter.Test.UWP")] \ No newline at end of file diff --git a/SDK/AppCenterPush/Microsoft.AppCenter.Push.iOS.Bindings/Properties/AssemblyInfo.cs b/SDK/AppCenterPush/Microsoft.AppCenter.Push.iOS.Bindings/Properties/AssemblyInfo.cs index eeb7bac97..06e1d4682 100644 --- a/SDK/AppCenterPush/Microsoft.AppCenter.Push.iOS.Bindings/Properties/AssemblyInfo.cs +++ b/SDK/AppCenterPush/Microsoft.AppCenter.Push.iOS.Bindings/Properties/AssemblyInfo.cs @@ -30,5 +30,5 @@ // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("0.0.0.0")] -[assembly: AssemblyFileVersion("1.5.0.0")] -[assembly: AssemblyInformationalVersion("1.5.0-SNAPSHOT")] +[assembly: AssemblyFileVersion("1.5.1.0")] +[assembly: AssemblyInformationalVersion("1.5.1-SNAPSHOT")] diff --git a/SDK/AppCenterPush/Microsoft.AppCenter.Push.iOS/Properties/AssemblyInfo.cs b/SDK/AppCenterPush/Microsoft.AppCenter.Push.iOS/Properties/AssemblyInfo.cs index ebd6c3552..86f94c0ae 100644 --- a/SDK/AppCenterPush/Microsoft.AppCenter.Push.iOS/Properties/AssemblyInfo.cs +++ b/SDK/AppCenterPush/Microsoft.AppCenter.Push.iOS/Properties/AssemblyInfo.cs @@ -24,5 +24,5 @@ // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("0.0.0.0")] -[assembly: AssemblyFileVersion("1.5.0.0")] -[assembly: AssemblyInformationalVersion("1.5.0-SNAPSHOT")] +[assembly: AssemblyFileVersion("1.5.1.0")] +[assembly: AssemblyInformationalVersion("1.5.1-SNAPSHOT")] diff --git a/SDK/AppCenterPush/Microsoft.AppCenter.Push/Microsoft.AppCenter.Push.csproj b/SDK/AppCenterPush/Microsoft.AppCenter.Push/Microsoft.AppCenter.Push.csproj index bc94cca4f..14b3ceb74 100644 --- a/SDK/AppCenterPush/Microsoft.AppCenter.Push/Microsoft.AppCenter.Push.csproj +++ b/SDK/AppCenterPush/Microsoft.AppCenter.Push/Microsoft.AppCenter.Push.csproj @@ -7,9 +7,9 @@ Microsoft Corp. All rights reserved. Microsoft.AppCenter.Push Microsoft Corporation - 1.5.0-SNAPSHOT + 1.5.1-SNAPSHOT 0.0.0.0 - 1.5.0.0 + 1.5.1.0 Microsoft.AppCenter.Push diff --git a/SDK/AppCenterRum/Microsoft.AppCenter.Rum.Android/Properties/AssemblyInfo.cs b/SDK/AppCenterRum/Microsoft.AppCenter.Rum.Android/Properties/AssemblyInfo.cs index 7ec5f6695..0d20aaa00 100644 --- a/SDK/AppCenterRum/Microsoft.AppCenter.Rum.Android/Properties/AssemblyInfo.cs +++ b/SDK/AppCenterRum/Microsoft.AppCenter.Rum.Android/Properties/AssemblyInfo.cs @@ -24,5 +24,5 @@ // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("0.0.0.0")] -[assembly: AssemblyFileVersion("1.5.0.0")] -[assembly: AssemblyInformationalVersion("1.5.0-SNAPSHOT")] +[assembly: AssemblyFileVersion("1.5.1.0")] +[assembly: AssemblyInformationalVersion("1.5.1-SNAPSHOT")] diff --git a/SDK/AppCenterRum/Microsoft.AppCenter.Rum.UWP/Properties/AssemblyInfo.cs b/SDK/AppCenterRum/Microsoft.AppCenter.Rum.UWP/Properties/AssemblyInfo.cs index 42911609c..085f59838 100644 --- a/SDK/AppCenterRum/Microsoft.AppCenter.Rum.UWP/Properties/AssemblyInfo.cs +++ b/SDK/AppCenterRum/Microsoft.AppCenter.Rum.UWP/Properties/AssemblyInfo.cs @@ -25,5 +25,5 @@ // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("0.0.0.0")] -[assembly: AssemblyFileVersion("1.5.0.0")] +[assembly: AssemblyFileVersion("1.5.1.0")] [assembly: ComVisible(false)] \ No newline at end of file diff --git a/SDK/AppCenterRum/Microsoft.AppCenter.Rum/Microsoft.AppCenter.Rum.csproj b/SDK/AppCenterRum/Microsoft.AppCenter.Rum/Microsoft.AppCenter.Rum.csproj index 386c823b6..23b12da29 100644 --- a/SDK/AppCenterRum/Microsoft.AppCenter.Rum/Microsoft.AppCenter.Rum.csproj +++ b/SDK/AppCenterRum/Microsoft.AppCenter.Rum/Microsoft.AppCenter.Rum.csproj @@ -7,9 +7,9 @@ Microsoft Corp. All rights reserved. Microsoft.AppCenter.Rum Microsoft Corporation - 1.5.0-SNAPSHOT + 1.5.1-SNAPSHOT 0.0.0.0 - 1.5.0.0 + 1.5.1.0 Microsoft.AppCenter.Rum diff --git a/Tests/Contoso.Forms.Test/Properties/AssemblyInfo.cs b/Tests/Contoso.Forms.Test/Properties/AssemblyInfo.cs index f13ab7ea6..5fb98746d 100644 --- a/Tests/Contoso.Forms.Test/Properties/AssemblyInfo.cs +++ b/Tests/Contoso.Forms.Test/Properties/AssemblyInfo.cs @@ -17,8 +17,8 @@ // and "{Major}.{Minor}.{Build}.*" will update just the revision. [assembly: AssemblyVersion("0.0.0.0")] -[assembly: AssemblyFileVersion("1.5.0.0")] -[assembly: AssemblyInformationalVersion("1.5.0-SNAPSHOT")] +[assembly: AssemblyFileVersion("1.5.1.0")] +[assembly: AssemblyInformationalVersion("1.5.1-SNAPSHOT")] // The following attributes are used to specify the signing key for the assembly, // if desired. See the Mono documentation for more information about signing. diff --git a/Tests/Droid/Properties/AndroidManifest.xml b/Tests/Droid/Properties/AndroidManifest.xml index 669ed702d..6680cdd9d 100644 --- a/Tests/Droid/Properties/AndroidManifest.xml +++ b/Tests/Droid/Properties/AndroidManifest.xml @@ -1,5 +1,5 @@ - + diff --git a/Tests/Droid/Properties/AssemblyInfo.cs b/Tests/Droid/Properties/AssemblyInfo.cs index 823d92891..7f6dc40ed 100644 --- a/Tests/Droid/Properties/AssemblyInfo.cs +++ b/Tests/Droid/Properties/AssemblyInfo.cs @@ -17,8 +17,8 @@ // and "{Major}.{Minor}.{Build}.*" will update just the revision. [assembly: AssemblyVersion("0.0.0.0")] -[assembly: AssemblyFileVersion("1.5.0.0")] -[assembly: AssemblyInformationalVersion("1.5.0-SNAPSHOT")] +[assembly: AssemblyFileVersion("1.5.1.0")] +[assembly: AssemblyInformationalVersion("1.5.1-SNAPSHOT")] // The following attributes are used to specify the signing key for the assembly, // if desired. See the Mono documentation for more information about signing. diff --git a/Tests/Microsoft.AppCenter.Analytics.NET/Properties/AssemblyInfo.cs b/Tests/Microsoft.AppCenter.Analytics.NET/Properties/AssemblyInfo.cs index ad23f4d05..192f73483 100644 --- a/Tests/Microsoft.AppCenter.Analytics.NET/Properties/AssemblyInfo.cs +++ b/Tests/Microsoft.AppCenter.Analytics.NET/Properties/AssemblyInfo.cs @@ -33,7 +33,7 @@ // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("0.0.0.0")] -[assembly: AssemblyFileVersion("1.5.0.0")] -[assembly: AssemblyInformationalVersion("1.5.0-SNAPSHOT")] +[assembly: AssemblyFileVersion("1.5.1.0")] +[assembly: AssemblyInformationalVersion("1.5.1-SNAPSHOT")] [assembly: InternalsVisibleTo("Microsoft.AppCenter.Analytics.Test.Windows")] \ No newline at end of file diff --git a/Tests/Microsoft.AppCenter.Analytics.Test.Windows/Properties/AssemblyInfo.cs b/Tests/Microsoft.AppCenter.Analytics.Test.Windows/Properties/AssemblyInfo.cs index 3b7639fe9..a73294bf0 100644 --- a/Tests/Microsoft.AppCenter.Analytics.Test.Windows/Properties/AssemblyInfo.cs +++ b/Tests/Microsoft.AppCenter.Analytics.Test.Windows/Properties/AssemblyInfo.cs @@ -16,5 +16,5 @@ // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("0.0.0.0")] -[assembly: AssemblyFileVersion("1.5.0.0")] -[assembly: AssemblyInformationalVersion("1.5.0-SNAPSHOT")] +[assembly: AssemblyFileVersion("1.5.1.0")] +[assembly: AssemblyInformationalVersion("1.5.1-SNAPSHOT")] diff --git a/Tests/Microsoft.AppCenter.NET/Properties/AssemblyInfo.cs b/Tests/Microsoft.AppCenter.NET/Properties/AssemblyInfo.cs index 24ca5ca74..5f510a333 100644 --- a/Tests/Microsoft.AppCenter.NET/Properties/AssemblyInfo.cs +++ b/Tests/Microsoft.AppCenter.NET/Properties/AssemblyInfo.cs @@ -33,8 +33,8 @@ // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("0.0.0.0")] -[assembly: AssemblyFileVersion("1.5.0.0")] -[assembly: AssemblyInformationalVersion("1.5.0-SNAPSHOT")] +[assembly: AssemblyFileVersion("1.5.1.0")] +[assembly: AssemblyInformationalVersion("1.5.1-SNAPSHOT")] [assembly: InternalsVisibleTo("Microsoft.AppCenter.Test.Windows")] [assembly: InternalsVisibleTo("Microsoft.AppCenter.Analytics.Test.Windows")] diff --git a/Tests/Microsoft.AppCenter.Push.NET/Properties/AssemblyInfo.cs b/Tests/Microsoft.AppCenter.Push.NET/Properties/AssemblyInfo.cs index a92bf0935..31eb26297 100644 --- a/Tests/Microsoft.AppCenter.Push.NET/Properties/AssemblyInfo.cs +++ b/Tests/Microsoft.AppCenter.Push.NET/Properties/AssemblyInfo.cs @@ -33,4 +33,4 @@ // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.5.0.0")] +[assembly: AssemblyFileVersion("1.5.1.0")] diff --git a/Tests/Microsoft.AppCenter.Push.Test.Windows/Properties/AssemblyInfo.cs b/Tests/Microsoft.AppCenter.Push.Test.Windows/Properties/AssemblyInfo.cs index 4d20090b3..ecc3ce8b7 100644 --- a/Tests/Microsoft.AppCenter.Push.Test.Windows/Properties/AssemblyInfo.cs +++ b/Tests/Microsoft.AppCenter.Push.Test.Windows/Properties/AssemblyInfo.cs @@ -33,4 +33,4 @@ // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.5.0.0")] +[assembly: AssemblyFileVersion("1.5.1.0")] diff --git a/Tests/Microsoft.AppCenter.Test.UWP/Package.appxmanifest b/Tests/Microsoft.AppCenter.Test.UWP/Package.appxmanifest index a286c52fb..6e321bdfd 100644 --- a/Tests/Microsoft.AppCenter.Test.UWP/Package.appxmanifest +++ b/Tests/Microsoft.AppCenter.Test.UWP/Package.appxmanifest @@ -7,7 +7,7 @@ + Version="1.5.1.0" /> diff --git a/Tests/Microsoft.AppCenter.Test.UWP/Properties/AssemblyInfo.cs b/Tests/Microsoft.AppCenter.Test.UWP/Properties/AssemblyInfo.cs index 2fc4d1f50..76b42677d 100644 --- a/Tests/Microsoft.AppCenter.Test.UWP/Properties/AssemblyInfo.cs +++ b/Tests/Microsoft.AppCenter.Test.UWP/Properties/AssemblyInfo.cs @@ -14,5 +14,5 @@ // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.5.0.0")] +[assembly: AssemblyFileVersion("1.5.1.0")] [assembly: ComVisible(false)] \ No newline at end of file diff --git a/Tests/Microsoft.AppCenter.Test.Windows/Properties/AssemblyInfo.cs b/Tests/Microsoft.AppCenter.Test.Windows/Properties/AssemblyInfo.cs index aa77ecb54..cc47a9bab 100644 --- a/Tests/Microsoft.AppCenter.Test.Windows/Properties/AssemblyInfo.cs +++ b/Tests/Microsoft.AppCenter.Test.Windows/Properties/AssemblyInfo.cs @@ -16,5 +16,5 @@ // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("0.0.0.0")] -[assembly: AssemblyFileVersion("1.5.0.0")] -[assembly: AssemblyInformationalVersion("1.5.0-SNAPSHOT")] +[assembly: AssemblyFileVersion("1.5.1.0")] +[assembly: AssemblyInformationalVersion("1.5.1-SNAPSHOT")] diff --git a/Tests/Microsoft.AppCenter.Test.WindowsDesktop/Properties/AssemblyInfo.cs b/Tests/Microsoft.AppCenter.Test.WindowsDesktop/Properties/AssemblyInfo.cs index 42a46c1ff..3b9083cbf 100644 --- a/Tests/Microsoft.AppCenter.Test.WindowsDesktop/Properties/AssemblyInfo.cs +++ b/Tests/Microsoft.AppCenter.Test.WindowsDesktop/Properties/AssemblyInfo.cs @@ -17,4 +17,4 @@ // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.5.0.0")] +[assembly: AssemblyFileVersion("1.5.1.0")] diff --git a/Tests/iOS/Info.plist b/Tests/iOS/Info.plist index da90dc536..65bf888a5 100644 --- a/Tests/iOS/Info.plist +++ b/Tests/iOS/Info.plist @@ -9,9 +9,9 @@ CFBundleIdentifier com.contoso.contoso-forms-test CFBundleShortVersionString - 1.5.0 + 1.5.1 CFBundleVersion - 1.5.0 + 1.5.1 LSRequiresIPhoneOS MinimumOSVersion diff --git a/scripts/configuration/ac-build-config.xml b/scripts/configuration/ac-build-config.xml index 97dc810d7..e62f21a49 100644 --- a/scripts/configuration/ac-build-config.xml +++ b/scripts/configuration/ac-build-config.xml @@ -1,7 +1,7 @@ - 1.5.0-SNAPSHOT + 1.5.1-SNAPSHOT 1.5.0 1.4.0 From bb23d91f1ce902b1344dfafa445a1e774e164139 Mon Sep 17 00:00:00 2001 From: Guillaume Perrot Date: Fri, 2 Mar 2018 17:31:09 -0800 Subject: [PATCH 07/46] Fix forms preview in our own apps --- .../Contoso.Forms.Demo/App.xaml.cs | 56 ++++++------ .../Contoso.Forms.Puppet/App.xaml.cs | 91 ++++++++++--------- 2 files changed, 76 insertions(+), 71 deletions(-) diff --git a/Apps/Contoso.Forms.Demo/Contoso.Forms.Demo/App.xaml.cs b/Apps/Contoso.Forms.Demo/Contoso.Forms.Demo/App.xaml.cs index f0930ab70..a24faf6ee 100644 --- a/Apps/Contoso.Forms.Demo/Contoso.Forms.Demo/App.xaml.cs +++ b/Apps/Contoso.Forms.Demo/Contoso.Forms.Demo/App.xaml.cs @@ -19,13 +19,7 @@ public partial class App : Application const string androidKey = "987b5941-4fac-4968-933e-98a7ff29237c"; const string iosKey = "fe2bf05d-f4f9-48a6-83d9-ea8033fbb644"; - static App() - { - Crashes.SendingErrorReport += SendingErrorReportHandler; - Crashes.SentErrorReport += SentErrorReportHandler; - Crashes.FailedToSendErrorReport += FailedToSendErrorReportHandler; - Push.PushNotificationReceived += OnPushNotificationReceived; - } + static bool _configured; public App() { @@ -35,26 +29,34 @@ public App() protected override void OnStart() { - AppCenter.LogLevel = LogLevel.Verbose; - Crashes.ShouldProcessErrorReport = ShouldProcess; - Crashes.ShouldAwaitUserConfirmation = ConfirmationHandler; - Crashes.GetErrorAttachments = GetErrorAttachments; - Distribute.ReleaseAvailable = OnReleaseAvailable; - AppCenter.Start($"uwp={uwpKey};android={androidKey};ios={iosKey}", - typeof(Analytics), typeof(Crashes), typeof(Distribute), typeof(Push)); - - AppCenter.GetInstallIdAsync().ContinueWith(installId => - { - AppCenterLog.Info(LogTag, "AppCenter.InstallId=" + installId.Result); - }); - Crashes.HasCrashedInLastSessionAsync().ContinueWith(hasCrashed => - { - AppCenterLog.Info(LogTag, "Crashes.HasCrashedInLastSession=" + hasCrashed.Result); - }); - Crashes.GetLastSessionCrashReportAsync().ContinueWith(report => - { - AppCenterLog.Info(LogTag, "Crashes.LastSessionCrashReport.Exception=" + report.Result?.Exception); - }); + if (!_configured) + { + AppCenter.LogLevel = LogLevel.Verbose; + Crashes.SendingErrorReport += SendingErrorReportHandler; + Crashes.SendingErrorReport += SendingErrorReportHandler; + Crashes.SentErrorReport += SentErrorReportHandler; + Crashes.FailedToSendErrorReport += FailedToSendErrorReportHandler; + Crashes.ShouldProcessErrorReport = ShouldProcess; + Crashes.ShouldAwaitUserConfirmation = ConfirmationHandler; + Crashes.GetErrorAttachments = GetErrorAttachments; + Distribute.ReleaseAvailable = OnReleaseAvailable; + Push.PushNotificationReceived += OnPushNotificationReceived; + AppCenter.Start($"uwp={uwpKey};android={androidKey};ios={iosKey}", + typeof(Analytics), typeof(Crashes), typeof(Distribute), typeof(Push)); + AppCenter.GetInstallIdAsync().ContinueWith(installId => + { + AppCenterLog.Info(LogTag, "AppCenter.InstallId=" + installId.Result); + }); + Crashes.HasCrashedInLastSessionAsync().ContinueWith(hasCrashed => + { + AppCenterLog.Info(LogTag, "Crashes.HasCrashedInLastSession=" + hasCrashed.Result); + }); + Crashes.GetLastSessionCrashReportAsync().ContinueWith(report => + { + AppCenterLog.Info(LogTag, "Crashes.LastSessionCrashReport.Exception=" + report.Result?.Exception); + }); + _configured = true; + } } protected override void OnSleep() diff --git a/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet/App.xaml.cs b/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet/App.xaml.cs index 33cfef79b..76ad14c16 100644 --- a/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet/App.xaml.cs +++ b/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet/App.xaml.cs @@ -16,18 +16,11 @@ public partial class App public const string LogTag = "AppCenterXamarinPuppet"; // App Center keys - private const string UwpKey = "a678b499-1912-4a94-9d97-25b569284d3a"; - private const string AndroidKey = "bff0949b-7970-439d-9745-92cdc59b10fe"; - private const string IosKey = "b889c4f2-9ac2-4e2e-ae16-dae54f2c5899"; + const string UwpKey = "a678b499-1912-4a94-9d97-25b569284d3a"; + const string AndroidKey = "bff0949b-7970-439d-9745-92cdc59b10fe"; + const string IosKey = "b889c4f2-9ac2-4e2e-ae16-dae54f2c5899"; - static App() - { - // Set event handlers in static constructor to avoid duplication - Crashes.SendingErrorReport += SendingErrorReportHandler; - Crashes.SentErrorReport += SentErrorReportHandler; - Crashes.FailedToSendErrorReport += FailedToSendErrorReportHandler; - Push.PushNotificationReceived += PrintNotification; - } + static bool _configured; public App() { @@ -37,39 +30,49 @@ public App() protected override void OnStart() { - AppCenterLog.Assert(LogTag, "AppCenter.LogLevel=" + AppCenter.LogLevel); - AppCenter.LogLevel = LogLevel.Verbose; - AppCenterLog.Info(LogTag, "AppCenter.LogLevel=" + AppCenter.LogLevel); - AppCenterLog.Info(LogTag, "AppCenter.Configured=" + AppCenter.Configured); - - // Set callbacks - Crashes.ShouldProcessErrorReport = ShouldProcess; - Crashes.ShouldAwaitUserConfirmation = ConfirmationHandler; - Crashes.GetErrorAttachments = GetErrorAttachments; - Distribute.ReleaseAvailable = OnReleaseAvailable; - - AppCenterLog.Assert(LogTag, "AppCenter.Configured=" + AppCenter.Configured); - AppCenter.SetLogUrl("https://in-integration.dev.avalanch.es"); - Distribute.SetInstallUrl("http://install.appcenter-int.trafficmanager.net"); - Distribute.SetApiUrl("https://appcenter-int.trafficmanager.net/api/v0.1"); - AppCenter.Start($"uwp={UwpKey};android={AndroidKey};ios={IosKey}", typeof(Analytics), typeof(Crashes), typeof(Distribute), typeof(Push)); - AppCenter.IsEnabledAsync().ContinueWith(enabled => - { - AppCenterLog.Info(LogTag, "AppCenter.Enabled=" + enabled.Result); - }); - AppCenter.GetInstallIdAsync().ContinueWith(installId => - { - AppCenterLog.Info(LogTag, "AppCenter.InstallId=" + installId.Result); - }); - AppCenterLog.Info(LogTag, "AppCenter.SdkVersion=" + AppCenter.SdkVersion); - Crashes.HasCrashedInLastSessionAsync().ContinueWith(hasCrashed => - { - AppCenterLog.Info(LogTag, "Crashes.HasCrashedInLastSession=" + hasCrashed.Result); - }); - Crashes.GetLastSessionCrashReportAsync().ContinueWith(report => - { - AppCenterLog.Info(LogTag, "Crashes.LastSessionCrashReport.Exception=" + report.Result?.Exception); - }); + if (!_configured) + { + AppCenterLog.Assert(LogTag, "AppCenter.LogLevel=" + AppCenter.LogLevel); + AppCenter.LogLevel = LogLevel.Verbose; + AppCenterLog.Info(LogTag, "AppCenter.LogLevel=" + AppCenter.LogLevel); + AppCenterLog.Info(LogTag, "AppCenter.Configured=" + AppCenter.Configured); + + // Set callbacks + Crashes.ShouldProcessErrorReport = ShouldProcess; + Crashes.ShouldAwaitUserConfirmation = ConfirmationHandler; + Crashes.GetErrorAttachments = GetErrorAttachments; + Distribute.ReleaseAvailable = OnReleaseAvailable; + + // Event handlers + Crashes.SendingErrorReport += SendingErrorReportHandler; + Crashes.SentErrorReport += SentErrorReportHandler; + Crashes.FailedToSendErrorReport += FailedToSendErrorReportHandler; + Push.PushNotificationReceived += PrintNotification; + + AppCenterLog.Assert(LogTag, "AppCenter.Configured=" + AppCenter.Configured); + AppCenter.SetLogUrl("https://in-integration.dev.avalanch.es"); + Distribute.SetInstallUrl("http://install.appcenter-int.trafficmanager.net"); + Distribute.SetApiUrl("https://appcenter-int.trafficmanager.net/api/v0.1"); + AppCenter.Start($"uwp={UwpKey};android={AndroidKey};ios={IosKey}", typeof(Analytics), typeof(Crashes), typeof(Distribute), typeof(Push)); + AppCenter.IsEnabledAsync().ContinueWith(enabled => + { + AppCenterLog.Info(LogTag, "AppCenter.Enabled=" + enabled.Result); + }); + AppCenter.GetInstallIdAsync().ContinueWith(installId => + { + AppCenterLog.Info(LogTag, "AppCenter.InstallId=" + installId.Result); + }); + AppCenterLog.Info(LogTag, "AppCenter.SdkVersion=" + AppCenter.SdkVersion); + Crashes.HasCrashedInLastSessionAsync().ContinueWith(hasCrashed => + { + AppCenterLog.Info(LogTag, "Crashes.HasCrashedInLastSession=" + hasCrashed.Result); + }); + Crashes.GetLastSessionCrashReportAsync().ContinueWith(report => + { + AppCenterLog.Info(LogTag, "Crashes.LastSessionCrashReport.Exception=" + report.Result?.Exception); + }); + _configured = true; + } } static void PrintNotification(object sender, PushNotificationReceivedEventArgs e) From 5a4a1ad689cc0529f7d6614e2fa3acabb57bb840 Mon Sep 17 00:00:00 2001 From: Guillaume Perrot Date: Fri, 2 Mar 2018 17:43:08 -0800 Subject: [PATCH 08/46] Use AppCenter.Configured instead of tracking that ourselves in forms app --- Apps/Contoso.Forms.Demo/Contoso.Forms.Demo/App.xaml.cs | 5 +---- Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet/App.xaml.cs | 5 +---- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/Apps/Contoso.Forms.Demo/Contoso.Forms.Demo/App.xaml.cs b/Apps/Contoso.Forms.Demo/Contoso.Forms.Demo/App.xaml.cs index a24faf6ee..49c1a5da0 100644 --- a/Apps/Contoso.Forms.Demo/Contoso.Forms.Demo/App.xaml.cs +++ b/Apps/Contoso.Forms.Demo/Contoso.Forms.Demo/App.xaml.cs @@ -19,8 +19,6 @@ public partial class App : Application const string androidKey = "987b5941-4fac-4968-933e-98a7ff29237c"; const string iosKey = "fe2bf05d-f4f9-48a6-83d9-ea8033fbb644"; - static bool _configured; - public App() { InitializeComponent(); @@ -29,7 +27,7 @@ public App() protected override void OnStart() { - if (!_configured) + if (!AppCenter.Configured) { AppCenter.LogLevel = LogLevel.Verbose; Crashes.SendingErrorReport += SendingErrorReportHandler; @@ -55,7 +53,6 @@ protected override void OnStart() { AppCenterLog.Info(LogTag, "Crashes.LastSessionCrashReport.Exception=" + report.Result?.Exception); }); - _configured = true; } } diff --git a/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet/App.xaml.cs b/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet/App.xaml.cs index 76ad14c16..f29699224 100644 --- a/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet/App.xaml.cs +++ b/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet/App.xaml.cs @@ -20,8 +20,6 @@ public partial class App const string AndroidKey = "bff0949b-7970-439d-9745-92cdc59b10fe"; const string IosKey = "b889c4f2-9ac2-4e2e-ae16-dae54f2c5899"; - static bool _configured; - public App() { InitializeComponent(); @@ -30,7 +28,7 @@ public App() protected override void OnStart() { - if (!_configured) + if (!AppCenter.Configured) { AppCenterLog.Assert(LogTag, "AppCenter.LogLevel=" + AppCenter.LogLevel); AppCenter.LogLevel = LogLevel.Verbose; @@ -71,7 +69,6 @@ protected override void OnStart() { AppCenterLog.Info(LogTag, "Crashes.LastSessionCrashReport.Exception=" + report.Result?.Exception); }); - _configured = true; } } From d6eda3d97923cc3a07611f633df18ca6ac888b7a Mon Sep 17 00:00:00 2001 From: Jacob Wallraff Date: Mon, 19 Mar 2018 15:30:35 -0700 Subject: [PATCH 09/46] Adding issue template --- issue_template.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 issue_template.md diff --git a/issue_template.md b/issue_template.md new file mode 100644 index 000000000..72574085d --- /dev/null +++ b/issue_template.md @@ -0,0 +1,20 @@ +### **Description** + +_Please describe the issue you are facing or a feature you would like to be added to the SDK._ + +### **Repro Steps** + +_Please list the steps used to reproduce your issue._ + +1. +2. + +### **Details** + +1. Which app platform you are developing for? + - _Android/Apple/iOS_ +2. What third party libraries are you using? + - _example_ +3. Please enable verbose logging for your app using the line below and include the logs here. + +```AppCenter.LogLevel = LogLevel.Verbose;``` \ No newline at end of file From bafae95aab56a9e2a4cd82927ccdb2f605a9f57d Mon Sep 17 00:00:00 2001 From: Jacob Wallraff Date: Mon, 19 Mar 2018 15:46:50 -0700 Subject: [PATCH 10/46] Adding more details fields --- issue_template.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/issue_template.md b/issue_template.md index 72574085d..e4a33a6d6 100644 --- a/issue_template.md +++ b/issue_template.md @@ -13,8 +13,12 @@ _Please list the steps used to reproduce your issue._ 1. Which app platform you are developing for? - _Android/Apple/iOS_ -2. What third party libraries are you using? +2. Which OS version did you experience the issue on? + - _e.g. iOS 11, Android 8.1.0_ +3. What device version did you see this error on? Were you using an emulator or a physical device? + - _e.g. iPhone X physical device, Google Pixel 2 emulator_ +4. What third party libraries are you using? - _example_ -3. Please enable verbose logging for your app using the line below and include the logs here. +5. Please enable verbose logging for your app using the line below and include the logs here. ```AppCenter.LogLevel = LogLevel.Verbose;``` \ No newline at end of file From e39d55c750dc3832a43e19413d3f436fb9b2b501 Mon Sep 17 00:00:00 2001 From: Jacob Wallraff Date: Mon, 19 Mar 2018 16:29:25 -0700 Subject: [PATCH 11/46] Adding one more question and clarifying --- issue_template.md | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/issue_template.md b/issue_template.md index e4a33a6d6..c961771d3 100644 --- a/issue_template.md +++ b/issue_template.md @@ -11,14 +11,19 @@ _Please list the steps used to reproduce your issue._ ### **Details** -1. Which app platform you are developing for? +1. Which .NET SDKs are you using? + - [ ] UWP + - [ ] Xamarin.Android + - [ ] Xamarin.iOS + - [ ] Xamarin.Forms +2. Which app platform you are developing for? - _Android/Apple/iOS_ -2. Which OS version did you experience the issue on? +3. Which OS version did you experience the issue on? - _e.g. iOS 11, Android 8.1.0_ -3. What device version did you see this error on? Were you using an emulator or a physical device? +4. What device version did you see this error on? Were you using an emulator or a physical device? - _e.g. iPhone X physical device, Google Pixel 2 emulator_ -4. What third party libraries are you using? +5. What third party libraries are you using? - _example_ -5. Please enable verbose logging for your app using the line below and include the logs here. +6. Please enable verbose logging for your app using the line below before your call to `AppCenter.Start(...)` and include the logs here. ```AppCenter.LogLevel = LogLevel.Verbose;``` \ No newline at end of file From 8eae21ffef24b429b86afe7a824527f27f3a65b3 Mon Sep 17 00:00:00 2001 From: Jacob Wallraff Date: Mon, 19 Mar 2018 17:12:35 -0700 Subject: [PATCH 12/46] Revising questions --- issue_template.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/issue_template.md b/issue_template.md index c961771d3..1476f27e5 100644 --- a/issue_template.md +++ b/issue_template.md @@ -11,13 +11,13 @@ _Please list the steps used to reproduce your issue._ ### **Details** -1. Which .NET SDKs are you using? +1. What is your app platform/SDK? - [ ] UWP - [ ] Xamarin.Android - [ ] Xamarin.iOS - [ ] Xamarin.Forms -2. Which app platform you are developing for? - - _Android/Apple/iOS_ +2. Which SDK version are you using? + - _e.g. 1.5.0_ 3. Which OS version did you experience the issue on? - _e.g. iOS 11, Android 8.1.0_ 4. What device version did you see this error on? Were you using an emulator or a physical device? From 30d1819e3192b52ba6467346eb0660bfcc445062 Mon Sep 17 00:00:00 2001 From: Jacob Wallraff Date: Mon, 19 Mar 2018 17:16:57 -0700 Subject: [PATCH 13/46] Inlining log level setting code --- issue_template.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/issue_template.md b/issue_template.md index 1476f27e5..f7bf884c6 100644 --- a/issue_template.md +++ b/issue_template.md @@ -24,6 +24,5 @@ _Please list the steps used to reproduce your issue._ - _e.g. iPhone X physical device, Google Pixel 2 emulator_ 5. What third party libraries are you using? - _example_ -6. Please enable verbose logging for your app using the line below before your call to `AppCenter.Start(...)` and include the logs here. +6. Please enable verbose logging for your app using `AppCenter.LogLevel = LogLevel.Verbose` before your call to `AppCenter.Start(...)` and include the logs here: -```AppCenter.LogLevel = LogLevel.Verbose;``` \ No newline at end of file From 2c34cfc9b97a2cd057fcc321d615a0cf6457642a Mon Sep 17 00:00:00 2001 From: Jacob Wallraff Date: Tue, 20 Mar 2018 14:58:05 -0700 Subject: [PATCH 14/46] Removing unnecessary formatting --- issue_template.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/issue_template.md b/issue_template.md index f7bf884c6..3709756f8 100644 --- a/issue_template.md +++ b/issue_template.md @@ -1,10 +1,10 @@ ### **Description** -_Please describe the issue you are facing or a feature you would like to be added to the SDK._ +Please describe the issue you are facing or a feature you would like to be added to the SDK. ### **Repro Steps** -_Please list the steps used to reproduce your issue._ +Please list the steps used to reproduce your issue. 1. 2. @@ -17,12 +17,12 @@ _Please list the steps used to reproduce your issue._ - [ ] Xamarin.iOS - [ ] Xamarin.Forms 2. Which SDK version are you using? - - _e.g. 1.5.0_ + - e.g. 1.5.0 3. Which OS version did you experience the issue on? - - _e.g. iOS 11, Android 8.1.0_ + - e.g. iOS 11, Android 8.1.0 4. What device version did you see this error on? Were you using an emulator or a physical device? - - _e.g. iPhone X physical device, Google Pixel 2 emulator_ + - e.g. iPhone X physical device, Google Pixel 2 emulator 5. What third party libraries are you using? - - _example_ + - example 6. Please enable verbose logging for your app using `AppCenter.LogLevel = LogLevel.Verbose` before your call to `AppCenter.Start(...)` and include the logs here: From 111bd1d6bc27b5fabce81ff44bd57321ff44a79c Mon Sep 17 00:00:00 2001 From: Guillaume Perrot Date: Fri, 30 Mar 2018 18:48:10 -0700 Subject: [PATCH 15/46] Fix nuget icon url --- nuget/AppCenter.nuspec | 2 +- nuget/AppCenterAnalytics.nuspec | 2 +- nuget/AppCenterCrashes.nuspec | 2 +- nuget/AppCenterDistribute.nuspec | 2 +- nuget/AppCenterPush.nuspec | 2 +- nuget/AppCenterRum.nuspec | 2 +- nuget/MacAppCenter.nuspec | 2 +- nuget/MacAppCenterAnalytics.nuspec | 2 +- nuget/MacAppCenterCrashes.nuspec | 2 +- nuget/MacAppCenterDistribute.nuspec | 2 +- nuget/MacAppCenterPush.nuspec | 2 +- nuget/MacAppCenterRum.nuspec | 2 +- nuget/WindowsAppCenter.nuspec | 2 +- nuget/WindowsAppCenterAnalytics.nuspec | 2 +- nuget/WindowsAppCenterCrashes.nuspec | 2 +- nuget/WindowsAppCenterPush.nuspec | 2 +- nuget/WindowsAppCenterRum.nuspec | 2 +- 17 files changed, 17 insertions(+), 17 deletions(-) diff --git a/nuget/AppCenter.nuspec b/nuget/AppCenter.nuspec index 342001dbe..ed38c1080 100644 --- a/nuget/AppCenter.nuspec +++ b/nuget/AppCenter.nuspec @@ -13,7 +13,7 @@ en-US https://aka.ms/telgml https://aka.ms/vbgfx2 - https://aka.ms/xhh7sr + https://aka.ms/k76877 diff --git a/nuget/AppCenterAnalytics.nuspec b/nuget/AppCenterAnalytics.nuspec index 01ac9d6c4..41f1649b3 100644 --- a/nuget/AppCenterAnalytics.nuspec +++ b/nuget/AppCenterAnalytics.nuspec @@ -13,7 +13,7 @@ en-US https://aka.ms/telgml https://aka.ms/vbgfx2 - https://aka.ms/xhh7sr + https://aka.ms/k76877 diff --git a/nuget/AppCenterCrashes.nuspec b/nuget/AppCenterCrashes.nuspec index fccd0ce15..23963c5fe 100644 --- a/nuget/AppCenterCrashes.nuspec +++ b/nuget/AppCenterCrashes.nuspec @@ -13,7 +13,7 @@ en-US https://aka.ms/telgml https://aka.ms/vbgfx2 - https://aka.ms/xhh7sr + https://aka.ms/k76877 diff --git a/nuget/AppCenterDistribute.nuspec b/nuget/AppCenterDistribute.nuspec index bebafe580..3338ba71e 100644 --- a/nuget/AppCenterDistribute.nuspec +++ b/nuget/AppCenterDistribute.nuspec @@ -13,7 +13,7 @@ en-US https://aka.ms/telgml https://aka.ms/vbgfx2 - https://aka.ms/xhh7sr + https://aka.ms/k76877 diff --git a/nuget/AppCenterPush.nuspec b/nuget/AppCenterPush.nuspec index 3015e1e48..17b148a3e 100644 --- a/nuget/AppCenterPush.nuspec +++ b/nuget/AppCenterPush.nuspec @@ -13,7 +13,7 @@ en-US https://aka.ms/telgml https://aka.ms/vbgfx2 - https://aka.ms/xhh7sr + https://aka.ms/k76877 diff --git a/nuget/AppCenterRum.nuspec b/nuget/AppCenterRum.nuspec index ec95809b9..ca3467de9 100644 --- a/nuget/AppCenterRum.nuspec +++ b/nuget/AppCenterRum.nuspec @@ -11,7 +11,7 @@ mobilecenter https://aka.ms/telgml https://aka.ms/vbgfx2 - https://aka.ms/xhh7sr + https://aka.ms/k76877 diff --git a/nuget/MacAppCenter.nuspec b/nuget/MacAppCenter.nuspec index db232c62a..179f53f12 100644 --- a/nuget/MacAppCenter.nuspec +++ b/nuget/MacAppCenter.nuspec @@ -13,7 +13,7 @@ en-US https://aka.ms/telgml https://aka.ms/vbgfx2 - https://aka.ms/xhh7sr + https://aka.ms/k76877 diff --git a/nuget/MacAppCenterAnalytics.nuspec b/nuget/MacAppCenterAnalytics.nuspec index 1df08b375..e5d8c86ad 100644 --- a/nuget/MacAppCenterAnalytics.nuspec +++ b/nuget/MacAppCenterAnalytics.nuspec @@ -13,7 +13,7 @@ en-US https://aka.ms/telgml https://aka.ms/vbgfx2 - https://aka.ms/xhh7sr + https://aka.ms/k76877 diff --git a/nuget/MacAppCenterCrashes.nuspec b/nuget/MacAppCenterCrashes.nuspec index 1c8951858..7f8a48b3c 100644 --- a/nuget/MacAppCenterCrashes.nuspec +++ b/nuget/MacAppCenterCrashes.nuspec @@ -13,7 +13,7 @@ en-US https://aka.ms/telgml https://aka.ms/vbgfx2 - https://aka.ms/xhh7sr + https://aka.ms/k76877 diff --git a/nuget/MacAppCenterDistribute.nuspec b/nuget/MacAppCenterDistribute.nuspec index 4b14c413f..0ed6b7fcf 100644 --- a/nuget/MacAppCenterDistribute.nuspec +++ b/nuget/MacAppCenterDistribute.nuspec @@ -13,7 +13,7 @@ en-US https://aka.ms/telgml https://aka.ms/vbgfx2 - https://aka.ms/xhh7sr + https://aka.ms/k76877 diff --git a/nuget/MacAppCenterPush.nuspec b/nuget/MacAppCenterPush.nuspec index 80a4dec3e..8bd64fb36 100644 --- a/nuget/MacAppCenterPush.nuspec +++ b/nuget/MacAppCenterPush.nuspec @@ -13,7 +13,7 @@ en-US https://aka.ms/telgml https://aka.ms/vbgfx2 - https://aka.ms/xhh7sr + https://aka.ms/k76877 diff --git a/nuget/MacAppCenterRum.nuspec b/nuget/MacAppCenterRum.nuspec index 9d455200f..b26c672e7 100644 --- a/nuget/MacAppCenterRum.nuspec +++ b/nuget/MacAppCenterRum.nuspec @@ -11,7 +11,7 @@ mobilecenter https://aka.ms/telgml https://aka.ms/vbgfx2 - https://aka.ms/xhh7sr + https://aka.ms/k76877 diff --git a/nuget/WindowsAppCenter.nuspec b/nuget/WindowsAppCenter.nuspec index 2b9dfc9e7..9bad3ed6a 100644 --- a/nuget/WindowsAppCenter.nuspec +++ b/nuget/WindowsAppCenter.nuspec @@ -13,7 +13,7 @@ en-US https://aka.ms/telgml https://aka.ms/vbgfx2 - https://aka.ms/xhh7sr + https://aka.ms/k76877 diff --git a/nuget/WindowsAppCenterAnalytics.nuspec b/nuget/WindowsAppCenterAnalytics.nuspec index 8387f53de..bd1052d00 100644 --- a/nuget/WindowsAppCenterAnalytics.nuspec +++ b/nuget/WindowsAppCenterAnalytics.nuspec @@ -13,7 +13,7 @@ en-US https://aka.ms/telgml https://aka.ms/vbgfx2 - https://aka.ms/xhh7sr + https://aka.ms/k76877 diff --git a/nuget/WindowsAppCenterCrashes.nuspec b/nuget/WindowsAppCenterCrashes.nuspec index 4a8f22b37..6f842543e 100644 --- a/nuget/WindowsAppCenterCrashes.nuspec +++ b/nuget/WindowsAppCenterCrashes.nuspec @@ -13,7 +13,7 @@ en-US https://aka.ms/telgml https://aka.ms/vbgfx2 - https://aka.ms/xhh7sr + https://aka.ms/k76877 diff --git a/nuget/WindowsAppCenterPush.nuspec b/nuget/WindowsAppCenterPush.nuspec index a8dff35f9..746a0098b 100644 --- a/nuget/WindowsAppCenterPush.nuspec +++ b/nuget/WindowsAppCenterPush.nuspec @@ -13,7 +13,7 @@ en-US https://aka.ms/telgml https://aka.ms/vbgfx2 - https://aka.ms/xhh7sr + https://aka.ms/k76877 diff --git a/nuget/WindowsAppCenterRum.nuspec b/nuget/WindowsAppCenterRum.nuspec index 483b77a8a..e5d523fec 100644 --- a/nuget/WindowsAppCenterRum.nuspec +++ b/nuget/WindowsAppCenterRum.nuspec @@ -11,7 +11,7 @@ mobilecenter https://aka.ms/telgml https://aka.ms/vbgfx2 - https://aka.ms/xhh7sr + https://aka.ms/k76877 From ed0897b3b397709596580a87ee018334aa9552ff Mon Sep 17 00:00:00 2001 From: Guillaume Perrot Date: Mon, 2 Apr 2018 14:09:14 -0700 Subject: [PATCH 16/46] Document intercom support center --- issue_template.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/issue_template.md b/issue_template.md index 3709756f8..a615319f1 100644 --- a/issue_template.md +++ b/issue_template.md @@ -1,3 +1,9 @@ + + ### **Description** Please describe the issue you are facing or a feature you would like to be added to the SDK. From 516ce402d64dbe7ed67c6c988f60cddc1d687280 Mon Sep 17 00:00:00 2001 From: Guillaume Perrot Date: Mon, 2 Apr 2018 14:14:25 -0700 Subject: [PATCH 17/46] Update issue_template.md --- issue_template.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/issue_template.md b/issue_template.md index a615319f1..ce4ff19f4 100644 --- a/issue_template.md +++ b/issue_template.md @@ -1,6 +1,6 @@ From c1f8c643423572c6e619b37e6fe2d40b082883d1 Mon Sep 17 00:00:00 2001 From: Guillaume Perrot Date: Tue, 3 Apr 2018 16:44:24 -0700 Subject: [PATCH 18/46] Avoid check boxes since it has special meaning And fix file name to be consistent. And add some info to the template. --- issue_template.md => ISSUE_TEMPLATE.md | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) rename issue_template.md => ISSUE_TEMPLATE.md (78%) diff --git a/issue_template.md b/ISSUE_TEMPLATE.md similarity index 78% rename from issue_template.md rename to ISSUE_TEMPLATE.md index ce4ff19f4..a51b001ef 100644 --- a/issue_template.md +++ b/ISSUE_TEMPLATE.md @@ -17,11 +17,10 @@ Please list the steps used to reproduce your issue. ### **Details** -1. What is your app platform/SDK? - - [ ] UWP - - [ ] Xamarin.Android - - [ ] Xamarin.iOS - - [ ] Xamarin.Forms +1. What is your app platform (Xamarin.Android or Xamarin.iOS or UWP)? + - e.g. Xamarin.Forms on all 3 platforms (Android, iOS and UWP). +2. If Xamarin Forms, are you using shared code, PCL code or .NET standard code for the application? Which .NET standard version or which PCL profile? + - e.g. .NET standard 2.0. 2. Which SDK version are you using? - e.g. 1.5.0 3. Which OS version did you experience the issue on? @@ -31,4 +30,3 @@ Please list the steps used to reproduce your issue. 5. What third party libraries are you using? - example 6. Please enable verbose logging for your app using `AppCenter.LogLevel = LogLevel.Verbose` before your call to `AppCenter.Start(...)` and include the logs here: - From e4a768347630c70261e8eb3ef9699397fda907ce Mon Sep 17 00:00:00 2001 From: Guillaume Perrot Date: Tue, 3 Apr 2018 16:48:45 -0700 Subject: [PATCH 19/46] Fix wording and numbering --- ISSUE_TEMPLATE.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ISSUE_TEMPLATE.md b/ISSUE_TEMPLATE.md index a51b001ef..5380925ae 100644 --- a/ISSUE_TEMPLATE.md +++ b/ISSUE_TEMPLATE.md @@ -19,14 +19,14 @@ Please list the steps used to reproduce your issue. 1. What is your app platform (Xamarin.Android or Xamarin.iOS or UWP)? - e.g. Xamarin.Forms on all 3 platforms (Android, iOS and UWP). -2. If Xamarin Forms, are you using shared code, PCL code or .NET standard code for the application? Which .NET standard version or which PCL profile? +2. If using Xamarin.Forms or if using portable/shared code to call our SDK APIs, are you using shared project, PCL code or .NET standard code for the application? Which .NET standard version or which PCL profile? - e.g. .NET standard 2.0. 2. Which SDK version are you using? - e.g. 1.5.0 -3. Which OS version did you experience the issue on? +4. Which OS version did you experience the issue on? - e.g. iOS 11, Android 8.1.0 -4. What device version did you see this error on? Were you using an emulator or a physical device? +5. What device version did you see this error on? Were you using an emulator or a physical device? - e.g. iPhone X physical device, Google Pixel 2 emulator -5. What third party libraries are you using? +6. What third party libraries are you using? - example -6. Please enable verbose logging for your app using `AppCenter.LogLevel = LogLevel.Verbose` before your call to `AppCenter.Start(...)` and include the logs here: +7. Please enable verbose logging for your app using `AppCenter.LogLevel = LogLevel.Verbose` before your call to `AppCenter.Start(...)` and include the logs here: From cd75c6b791decf711bf3cce7c13e42031b055ee1 Mon Sep 17 00:00:00 2001 From: Denis Stankovski Date: Thu, 5 Apr 2018 15:47:44 +0200 Subject: [PATCH 20/46] Increased event and handled error max property count and item length --- .../Analytics.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/SDK/AppCenterAnalytics/Microsoft.AppCenter.Analytics.Windows.Shared/Analytics.cs b/SDK/AppCenterAnalytics/Microsoft.AppCenter.Analytics.Windows.Shared/Analytics.cs index 7573ec9fd..42347e15c 100644 --- a/SDK/AppCenterAnalytics/Microsoft.AppCenter.Analytics.Windows.Shared/Analytics.cs +++ b/SDK/AppCenterAnalytics/Microsoft.AppCenter.Analytics.Windows.Shared/Analytics.cs @@ -13,10 +13,10 @@ public class Analytics : AppCenterService { #region static - private const int MaxEventProperties = 5; + private const int MaxEventProperties = 20; private const int MaxEventNameLength = 256; - private const int MaxEventPropertyKeyLength = 64; - private const int MaxEventPropertyValueLength = 64; + private const int MaxEventPropertyKeyLength = 125; + private const int MaxEventPropertyValueLength = 125; private static readonly object AnalyticsLock = new object(); From 2f142d67175690c3ec82e2593d03fab4c054b7ec Mon Sep 17 00:00:00 2001 From: Denis Stankovski Date: Thu, 5 Apr 2018 22:02:17 +0200 Subject: [PATCH 21/46] Updated unit test --- .../AnalyticsTest.cs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Tests/Microsoft.AppCenter.Analytics.Test.Windows/AnalyticsTest.cs b/Tests/Microsoft.AppCenter.Analytics.Test.Windows/AnalyticsTest.cs index 933fa911c..5196e98b6 100644 --- a/Tests/Microsoft.AppCenter.Analytics.Test.Windows/AnalyticsTest.cs +++ b/Tests/Microsoft.AppCenter.Analytics.Test.Windows/AnalyticsTest.cs @@ -201,9 +201,9 @@ public void TrackEventInvalid() // Property key length exceeds maximum _mockChannel.ResetCalls(); - Analytics.TrackEvent("test", new Dictionary { { new string('?', 65), "test" } }); + Analytics.TrackEvent("test", new Dictionary { { new string('?', 126), "test" } }); _mockChannel.Verify(channel => channel.EnqueueAsync(It.Is(log => - log.Properties.First().Key.Length == 64)), Times.Once()); + log.Properties.First().Key.Length == 125)), Times.Once()); // Property value is null _mockChannel.ResetCalls(); @@ -213,20 +213,20 @@ public void TrackEventInvalid() // Property value length exceeds maximum _mockChannel.ResetCalls(); - Analytics.TrackEvent("test", new Dictionary { { "test", new string('?', 65) } }); + Analytics.TrackEvent("test", new Dictionary { { "test", new string('?', 126) } }); _mockChannel.Verify(channel => channel.EnqueueAsync(It.Is(log => - log.Properties.First().Value.Length == 64)), Times.Once()); + log.Properties.First().Value.Length == 125)), Times.Once()); // Properties size exceeds maximum _mockChannel.ResetCalls(); var manyProperties = new Dictionary(); - for (int i = 0; i < 6; i++) + for (int i = 0; i < 21; i++) { manyProperties["test" + i] = "test" + i; } Analytics.TrackEvent("test", manyProperties); _mockChannel.Verify(channel => channel.EnqueueAsync(It.Is(log => - log.Properties.Count == 5)), Times.Once()); + log.Properties.Count == 20)), Times.Once()); } /// From 0fe4cf2a7ba8dc2ef1be72c45563dcc34a2fc527 Mon Sep 17 00:00:00 2001 From: Ivan Matkov Date: Fri, 6 Apr 2018 13:50:41 +0300 Subject: [PATCH 22/46] Set desktop SDK target framework to 4.5 --- .../Microsoft.AppCenter.WindowsDesktop.csproj | 7 +- .../packages.config | 80 +++++++++---------- ....AppCenter.Analytics.WindowsDesktop.csproj | 7 +- .../packages.config | 2 +- ...ft.AppCenter.Crashes.WindowsDesktop.csproj | 6 +- .../project.json | 10 --- 6 files changed, 52 insertions(+), 60 deletions(-) delete mode 100644 SDK/AppCenterCrashes/Microsoft.AppCenter.Crashes.WindowsDesktop/project.json diff --git a/SDK/AppCenter/Microsoft.AppCenter.WindowsDesktop/Microsoft.AppCenter.WindowsDesktop.csproj b/SDK/AppCenter/Microsoft.AppCenter.WindowsDesktop/Microsoft.AppCenter.WindowsDesktop.csproj index aacbff886..6dd6e87c9 100644 --- a/SDK/AppCenter/Microsoft.AppCenter.WindowsDesktop/Microsoft.AppCenter.WindowsDesktop.csproj +++ b/SDK/AppCenter/Microsoft.AppCenter.WindowsDesktop/Microsoft.AppCenter.WindowsDesktop.csproj @@ -9,10 +9,11 @@ Properties Microsoft.AppCenter Microsoft.AppCenter - v4.5.2 + v4.5 512 + true @@ -58,8 +59,8 @@ - - ..\..\..\packages\System.Runtime.InteropServices.RuntimeInformation.4.0.0\lib\net45\System.Runtime.InteropServices.RuntimeInformation.dll + + ..\..\..\packages\System.Runtime.InteropServices.RuntimeInformation.4.3.0\lib\net45\System.Runtime.InteropServices.RuntimeInformation.dll diff --git a/SDK/AppCenter/Microsoft.AppCenter.WindowsDesktop/packages.config b/SDK/AppCenter/Microsoft.AppCenter.WindowsDesktop/packages.config index 42d7c42b2..e81b87b5d 100644 --- a/SDK/AppCenter/Microsoft.AppCenter.WindowsDesktop/packages.config +++ b/SDK/AppCenter/Microsoft.AppCenter.WindowsDesktop/packages.config @@ -1,43 +1,43 @@  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/SDK/AppCenterAnalytics/Microsoft.AppCenter.Analytics.WindowsDesktop/Microsoft.AppCenter.Analytics.WindowsDesktop.csproj b/SDK/AppCenterAnalytics/Microsoft.AppCenter.Analytics.WindowsDesktop/Microsoft.AppCenter.Analytics.WindowsDesktop.csproj index 4b7561184..ac384c3fa 100644 --- a/SDK/AppCenterAnalytics/Microsoft.AppCenter.Analytics.WindowsDesktop/Microsoft.AppCenter.Analytics.WindowsDesktop.csproj +++ b/SDK/AppCenterAnalytics/Microsoft.AppCenter.Analytics.WindowsDesktop/Microsoft.AppCenter.Analytics.WindowsDesktop.csproj @@ -9,8 +9,9 @@ Properties Microsoft.AppCenter.Analytics Microsoft.AppCenter.Analytics - v4.5.2 + v4.5 512 + true @@ -46,7 +47,9 @@ - + + Designer + diff --git a/SDK/AppCenterAnalytics/Microsoft.AppCenter.Analytics.WindowsDesktop/packages.config b/SDK/AppCenterAnalytics/Microsoft.AppCenter.Analytics.WindowsDesktop/packages.config index aa8e3da7c..4a612adcf 100644 --- a/SDK/AppCenterAnalytics/Microsoft.AppCenter.Analytics.WindowsDesktop/packages.config +++ b/SDK/AppCenterAnalytics/Microsoft.AppCenter.Analytics.WindowsDesktop/packages.config @@ -1,4 +1,4 @@  - + \ No newline at end of file diff --git a/SDK/AppCenterCrashes/Microsoft.AppCenter.Crashes.WindowsDesktop/Microsoft.AppCenter.Crashes.WindowsDesktop.csproj b/SDK/AppCenterCrashes/Microsoft.AppCenter.Crashes.WindowsDesktop/Microsoft.AppCenter.Crashes.WindowsDesktop.csproj index 7dbbeba57..bf03dd166 100644 --- a/SDK/AppCenterCrashes/Microsoft.AppCenter.Crashes.WindowsDesktop/Microsoft.AppCenter.Crashes.WindowsDesktop.csproj +++ b/SDK/AppCenterCrashes/Microsoft.AppCenter.Crashes.WindowsDesktop/Microsoft.AppCenter.Crashes.WindowsDesktop.csproj @@ -9,8 +9,9 @@ Properties Microsoft.AppCenter.Crashes Microsoft.AppCenter.Crashes - v4.5.2 + v4.5 512 + true @@ -43,9 +44,6 @@ - - - {1e9ec0aa-3e32-4551-80c4-e4f3e53d7590} diff --git a/SDK/AppCenterCrashes/Microsoft.AppCenter.Crashes.WindowsDesktop/project.json b/SDK/AppCenterCrashes/Microsoft.AppCenter.Crashes.WindowsDesktop/project.json deleted file mode 100644 index d6fffc81f..000000000 --- a/SDK/AppCenterCrashes/Microsoft.AppCenter.Crashes.WindowsDesktop/project.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "dependencies": { - }, - "frameworks": { - "net452": {} - }, - "runtimes": { - "win": {} - } -} \ No newline at end of file From 56bb2a6902514d5da2d42342a91fb6f4739850da Mon Sep 17 00:00:00 2001 From: Ivan Matkov Date: Fri, 6 Apr 2018 13:51:16 +0300 Subject: [PATCH 23/46] Update WPF sample apps --- Apps/Contoso.WPF.Demo/App.config | 6 +-- Apps/Contoso.WPF.Demo/Contoso.WPF.Demo.csproj | 3 +- .../Properties/Resources.Designer.cs | 44 ++++++++----------- .../Properties/Settings.Designer.cs | 22 ++++------ Apps/Contoso.WPF.Demo/project.json | 2 +- Apps/Contoso.WPF.Puppet/App.config | 6 +-- .../Contoso.WPF.Puppet.csproj | 3 +- .../Properties/Resources.Designer.cs | 44 ++++++++----------- .../Properties/Settings.Designer.cs | 22 ++++------ Apps/Contoso.WPF.Puppet/project.json | 2 +- 10 files changed, 66 insertions(+), 88 deletions(-) diff --git a/Apps/Contoso.WPF.Demo/App.config b/Apps/Contoso.WPF.Demo/App.config index 88fa4027b..d1428ad71 100644 --- a/Apps/Contoso.WPF.Demo/App.config +++ b/Apps/Contoso.WPF.Demo/App.config @@ -1,6 +1,6 @@ - + - + - \ No newline at end of file + diff --git a/Apps/Contoso.WPF.Demo/Contoso.WPF.Demo.csproj b/Apps/Contoso.WPF.Demo/Contoso.WPF.Demo.csproj index 8660b504f..e2f9e51eb 100644 --- a/Apps/Contoso.WPF.Demo/Contoso.WPF.Demo.csproj +++ b/Apps/Contoso.WPF.Demo/Contoso.WPF.Demo.csproj @@ -8,11 +8,12 @@ WinExe Contoso.WPF.Demo Contoso.WPF.Demo - v4.5.2 + v4.5 512 {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} 4 true + AnyCPU diff --git a/Apps/Contoso.WPF.Demo/Properties/Resources.Designer.cs b/Apps/Contoso.WPF.Demo/Properties/Resources.Designer.cs index a9a1b4e41..b27b0578b 100644 --- a/Apps/Contoso.WPF.Demo/Properties/Resources.Designer.cs +++ b/Apps/Contoso.WPF.Demo/Properties/Resources.Designer.cs @@ -8,10 +8,10 @@ // //------------------------------------------------------------------------------ -namespace Contoso.WPF.Demo.Properties -{ - - +namespace Contoso.WPF.Demo.Properties { + using System; + + /// /// A strongly-typed resource class, for looking up localized strings, etc. /// @@ -19,51 +19,43 @@ namespace Contoso.WPF.Demo.Properties // class via a tool like ResGen or Visual Studio. // To add or remove a member, edit your .ResX file then rerun ResGen // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - internal class Resources - { - + internal class Resources { + private static global::System.Resources.ResourceManager resourceMan; - + private static global::System.Globalization.CultureInfo resourceCulture; - + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] - internal Resources() - { + internal Resources() { } - + /// /// Returns the cached ResourceManager instance used by this class. /// [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Resources.ResourceManager ResourceManager - { - get - { - if ((resourceMan == null)) - { + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Contoso.WPF.Demo.Properties.Resources", typeof(Resources).Assembly); resourceMan = temp; } return resourceMan; } } - + /// /// Overrides the current thread's CurrentUICulture property for all /// resource lookups using this strongly typed resource class. /// [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Globalization.CultureInfo Culture - { - get - { + internal static global::System.Globalization.CultureInfo Culture { + get { return resourceCulture; } - set - { + set { resourceCulture = value; } } diff --git a/Apps/Contoso.WPF.Demo/Properties/Settings.Designer.cs b/Apps/Contoso.WPF.Demo/Properties/Settings.Designer.cs index 8a90a3b19..9695453de 100644 --- a/Apps/Contoso.WPF.Demo/Properties/Settings.Designer.cs +++ b/Apps/Contoso.WPF.Demo/Properties/Settings.Designer.cs @@ -8,21 +8,17 @@ // //------------------------------------------------------------------------------ -namespace Contoso.WPF.Demo.Properties -{ - - +namespace Contoso.WPF.Demo.Properties { + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] - internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase - { - + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.6.0.0")] + internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { + private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); - - public static Settings Default - { - get - { + + public static Settings Default { + get { return defaultInstance; } } diff --git a/Apps/Contoso.WPF.Demo/project.json b/Apps/Contoso.WPF.Demo/project.json index 3b5e3b06f..714d6c18f 100644 --- a/Apps/Contoso.WPF.Demo/project.json +++ b/Apps/Contoso.WPF.Demo/project.json @@ -4,7 +4,7 @@ "Microsoft.AppCenter.Crashes": "1.5.0" }, "frameworks": { - "net452": {} + "net45": {} }, "runtimes": { "win": {} diff --git a/Apps/Contoso.WPF.Puppet/App.config b/Apps/Contoso.WPF.Puppet/App.config index 88fa4027b..d1428ad71 100644 --- a/Apps/Contoso.WPF.Puppet/App.config +++ b/Apps/Contoso.WPF.Puppet/App.config @@ -1,6 +1,6 @@ - + - + - \ No newline at end of file + diff --git a/Apps/Contoso.WPF.Puppet/Contoso.WPF.Puppet.csproj b/Apps/Contoso.WPF.Puppet/Contoso.WPF.Puppet.csproj index caf7a2020..360533e16 100644 --- a/Apps/Contoso.WPF.Puppet/Contoso.WPF.Puppet.csproj +++ b/Apps/Contoso.WPF.Puppet/Contoso.WPF.Puppet.csproj @@ -8,13 +8,14 @@ WinExe Contoso.WPF.Puppet Contoso.WPF.Puppet - v4.5.2 + v4.5 512 {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} 4 true + AnyCPU diff --git a/Apps/Contoso.WPF.Puppet/Properties/Resources.Designer.cs b/Apps/Contoso.WPF.Puppet/Properties/Resources.Designer.cs index 534c182ae..671b808a8 100644 --- a/Apps/Contoso.WPF.Puppet/Properties/Resources.Designer.cs +++ b/Apps/Contoso.WPF.Puppet/Properties/Resources.Designer.cs @@ -8,10 +8,10 @@ // //------------------------------------------------------------------------------ -namespace Contoso.WPF.Puppet.Properties -{ - - +namespace Contoso.WPF.Puppet.Properties { + using System; + + /// /// A strongly-typed resource class, for looking up localized strings, etc. /// @@ -19,51 +19,43 @@ namespace Contoso.WPF.Puppet.Properties // class via a tool like ResGen or Visual Studio. // To add or remove a member, edit your .ResX file then rerun ResGen // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - internal class Resources - { - + internal class Resources { + private static global::System.Resources.ResourceManager resourceMan; - + private static global::System.Globalization.CultureInfo resourceCulture; - + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] - internal Resources() - { + internal Resources() { } - + /// /// Returns the cached ResourceManager instance used by this class. /// [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Resources.ResourceManager ResourceManager - { - get - { - if ((resourceMan == null)) - { + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Contoso.WPF.Puppet.Properties.Resources", typeof(Resources).Assembly); resourceMan = temp; } return resourceMan; } } - + /// /// Overrides the current thread's CurrentUICulture property for all /// resource lookups using this strongly typed resource class. /// [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Globalization.CultureInfo Culture - { - get - { + internal static global::System.Globalization.CultureInfo Culture { + get { return resourceCulture; } - set - { + set { resourceCulture = value; } } diff --git a/Apps/Contoso.WPF.Puppet/Properties/Settings.Designer.cs b/Apps/Contoso.WPF.Puppet/Properties/Settings.Designer.cs index ce64fcd05..0e0696516 100644 --- a/Apps/Contoso.WPF.Puppet/Properties/Settings.Designer.cs +++ b/Apps/Contoso.WPF.Puppet/Properties/Settings.Designer.cs @@ -8,21 +8,17 @@ // //------------------------------------------------------------------------------ -namespace Contoso.WPF.Puppet.Properties -{ - - +namespace Contoso.WPF.Puppet.Properties { + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] - internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase - { - + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.6.0.0")] + internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { + private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); - - public static Settings Default - { - get - { + + public static Settings Default { + get { return defaultInstance; } } diff --git a/Apps/Contoso.WPF.Puppet/project.json b/Apps/Contoso.WPF.Puppet/project.json index e0cf888d4..cac48da3c 100644 --- a/Apps/Contoso.WPF.Puppet/project.json +++ b/Apps/Contoso.WPF.Puppet/project.json @@ -3,7 +3,7 @@ "sqlite-net-pcl": "1.3.1" }, "frameworks": { - "net452": {} + "net45": {} }, "runtimes": { "win": {} From 7553f4f6f7c6a2ca92cca2b12250eb0c9104f9bd Mon Sep 17 00:00:00 2001 From: Guillaume Perrot Date: Fri, 6 Apr 2018 16:39:58 -0700 Subject: [PATCH 24/46] Add logging for .net exception on ios --- .../Microsoft.AppCenter.Crashes.iOS/Crashes.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/SDK/AppCenterCrashes/Microsoft.AppCenter.Crashes.iOS/Crashes.cs b/SDK/AppCenterCrashes/Microsoft.AppCenter.Crashes.iOS/Crashes.cs index 4bcb99f5c..547f242e7 100644 --- a/SDK/AppCenterCrashes/Microsoft.AppCenter.Crashes.iOS/Crashes.cs +++ b/SDK/AppCenterCrashes/Microsoft.AppCenter.Crashes.iOS/Crashes.cs @@ -100,6 +100,7 @@ static Crashes() static void OnUnhandledException(object sender, UnhandledExceptionEventArgs e) { Exception systemException = e.ExceptionObject as Exception; + AppCenterLog.Error(LogTag, "Unhandled Exception:", systemException); MSException exception = GenerateiOSException(systemException, true); byte[] exceptionBytes = CrashesUtils.SerializeException(systemException); NSData wrapperExceptionData = NSData.FromArray(exceptionBytes); @@ -110,7 +111,9 @@ static void OnUnhandledException(object sender, UnhandledExceptionEventArgs e) ExceptionData = wrapperExceptionData, ProcessId = new NSNumber(Process.GetCurrentProcess().Id) }; + AppCenterLog.Info(LogTag, "Saving wrapper exception..."); MSWrapperExceptionManager.SaveWrapperException(wrapperException); + AppCenterLog.Info(LogTag, "Saved wrapper exception."); } static MSException GenerateiOSException(Exception exception, bool structuredFrames) From 28d220f0392095f89c4282fece8746d61ebbaa8b Mon Sep 17 00:00:00 2001 From: Guillaume Perrot Date: Fri, 6 Apr 2018 18:01:44 -0700 Subject: [PATCH 25/46] Fix rewing session id on UWP --- .../Analytics.cs | 24 ++- .../Channel/SessionTracker.cs | 18 +-- .../Analytics.cs | 3 +- .../NamespaceDoc.cs | 4 +- .../SessionTrackerTest.cs | 140 +++++++++++------- 5 files changed, 114 insertions(+), 75 deletions(-) diff --git a/SDK/AppCenterAnalytics/Microsoft.AppCenter.Analytics.Windows.Shared/Analytics.cs b/SDK/AppCenterAnalytics/Microsoft.AppCenter.Analytics.Windows.Shared/Analytics.cs index 42347e15c..3fdffe731 100644 --- a/SDK/AppCenterAnalytics/Microsoft.AppCenter.Analytics.Windows.Shared/Analytics.cs +++ b/SDK/AppCenterAnalytics/Microsoft.AppCenter.Analytics.Windows.Shared/Analytics.cs @@ -89,10 +89,11 @@ public static void TrackEvent(string name, IDictionary propertie #region instance // Internal for testing purposes - internal ISessionTracker SessionTracker; + private ISessionTracker _sessionTracker; + private readonly ISessionTrackerFactory _sessionTrackerFactory; - internal Analytics() + private Analytics() { LogSerializer.AddLogType(PageLog.JsonIdentifier, typeof(PageLog)); LogSerializer.AddLogType(EventLog.JsonIdentifier, typeof(EventLog)); @@ -106,10 +107,7 @@ internal Analytics(ISessionTrackerFactory sessionTrackerFactory) : this() public override bool InstanceEnabled { - get - { - return base.InstanceEnabled; - } + get => base.InstanceEnabled; set { @@ -160,26 +158,26 @@ private void ApplyEnabledState(bool enabled) { lock (_serviceLock) { - if (enabled && ChannelGroup != null && SessionTracker == null) + if (enabled && ChannelGroup != null && _sessionTracker == null) { - SessionTracker = CreateSessionTracker(ChannelGroup, Channel, ApplicationSettings); + _sessionTracker = CreateSessionTracker(ChannelGroup, Channel, ApplicationSettings); if (!ApplicationLifecycleHelper.Instance.IsSuspended) { - SessionTracker.Resume(); + _sessionTracker.Resume(); } SubscribeToApplicationLifecycleEvents(); } else if (!enabled) { UnsubscribeFromApplicationLifecycleEvents(); - SessionTracker = null; + _sessionTracker = null; } } } private ISessionTracker CreateSessionTracker(IChannelGroup channelGroup, IChannelUnit channel, IApplicationSettings applicationSettings) { - return _sessionTrackerFactory?.CreateSessionTracker(channelGroup, channel, applicationSettings) ?? new SessionTracker(channelGroup, channel, applicationSettings); + return _sessionTrackerFactory?.CreateSessionTracker(channelGroup, channel, applicationSettings) ?? new SessionTracker(channelGroup, channel); } /// @@ -218,12 +216,12 @@ private void UnsubscribeFromApplicationLifecycleEvents() private void ApplicationResumingEventHandler(object sender, EventArgs e) { - SessionTracker?.Resume(); + _sessionTracker?.Resume(); } private void ApplicationSuspendedEventHandler(object sender, EventArgs e) { - SessionTracker?.Pause(); + _sessionTracker?.Pause(); } /// diff --git a/SDK/AppCenterAnalytics/Microsoft.AppCenter.Analytics.Windows.Shared/Channel/SessionTracker.cs b/SDK/AppCenterAnalytics/Microsoft.AppCenter.Analytics.Windows.Shared/Channel/SessionTracker.cs index 6ad3a6f3e..a8bc132e9 100644 --- a/SDK/AppCenterAnalytics/Microsoft.AppCenter.Analytics.Windows.Shared/Channel/SessionTracker.cs +++ b/SDK/AppCenterAnalytics/Microsoft.AppCenter.Analytics.Windows.Shared/Channel/SessionTracker.cs @@ -6,6 +6,7 @@ using Microsoft.AppCenter.Ingestion.Models; using Microsoft.AppCenter.Utils; +// ReSharper disable once CheckNamespace namespace Microsoft.AppCenter.Analytics.Channel { internal class SessionTracker : ISessionTracker @@ -30,20 +31,18 @@ private enum SessionState // Some fields are internal for testing internal static long SessionTimeout = 20000; private readonly IChannelUnit _channel; - internal Guid _sid = Guid.Empty; + internal Guid Sid = Guid.Empty; private long _lastQueuedLogTime; private long _lastResumedTime; private long _lastPausedTime; - private readonly IApplicationSettings _applicationSettings; private readonly object _lockObject = new object(); - public SessionTracker(IChannelGroup channelGroup, IChannelUnit channel, IApplicationSettings applicationSettings) + public SessionTracker(IChannel channelGroup, IChannelUnit channel) { // Need to lock in constructor because of the event handler being set for channelGroup. lock (_lockObject) { _channel = channel; - _applicationSettings = applicationSettings; channelGroup.EnqueuingLog += HandleEnqueuingLog; } } @@ -90,7 +89,7 @@ private void HandleEnqueuingLog(object sender, EnqueuingLogEventArgs e) return; } SendStartSessionIfNeeded(); - e.Log.Sid = _sid == Guid.Empty ? null : new Guid?(_sid); + e.Log.Sid = Sid == Guid.Empty ? null : new Guid?(Sid); _lastQueuedLogTime = TimeHelper.CurrentTimeInMilliseconds(); } } @@ -98,16 +97,17 @@ private void HandleEnqueuingLog(object sender, EnqueuingLogEventArgs e) private void SendStartSessionIfNeeded() { var now = TimeHelper.CurrentTimeInMilliseconds(); - if (_sid != Guid.Empty && !HasSessionTimedOut(now)) + if (Sid != Guid.Empty && !HasSessionTimedOut(now)) { return; } - _sid = Guid.NewGuid(); + var previousSid = Sid; + Sid = Guid.NewGuid(); #pragma warning disable CS0612 // Type or member is obsolete - AppCenter.TestAndSetCorrelationId(Guid.Empty, ref _sid); + AppCenter.TestAndSetCorrelationId(previousSid, ref Sid); #pragma warning restore CS0612 // Type or member is obsolete _lastQueuedLogTime = TimeHelper.CurrentTimeInMilliseconds(); - var startSessionLog = new StartSessionLog { Sid = _sid }; + var startSessionLog = new StartSessionLog { Sid = Sid }; _channel.EnqueueAsync(startSessionLog); } diff --git a/SDK/AppCenterAnalytics/Microsoft.AppCenter.Analytics/Analytics.cs b/SDK/AppCenterAnalytics/Microsoft.AppCenter.Analytics/Analytics.cs index 31e3b4f76..50493e887 100644 --- a/SDK/AppCenterAnalytics/Microsoft.AppCenter.Analytics/Analytics.cs +++ b/SDK/AppCenterAnalytics/Microsoft.AppCenter.Analytics/Analytics.cs @@ -3,12 +3,13 @@ namespace Microsoft.AppCenter.Analytics { + /// /// /// Analytics feature. /// public class Analytics : IAppCenterService { - internal Analytics() + private Analytics() { } diff --git a/SDK/AppCenterAnalytics/Microsoft.AppCenter.Analytics/NamespaceDoc.cs b/SDK/AppCenterAnalytics/Microsoft.AppCenter.Analytics/NamespaceDoc.cs index 46667c32d..5c51ab431 100644 --- a/SDK/AppCenterAnalytics/Microsoft.AppCenter.Analytics/NamespaceDoc.cs +++ b/SDK/AppCenterAnalytics/Microsoft.AppCenter.Analytics/NamespaceDoc.cs @@ -1,9 +1,9 @@ -namespace Microsoft.AppCenterAnalytics +namespace Microsoft.AppCenter.Analytics { /// /// Analytics SDK module. /// - class NamespaceDoc + internal class NamespaceDoc { } } diff --git a/Tests/Microsoft.AppCenter.Analytics.Test.Windows/SessionTrackerTest.cs b/Tests/Microsoft.AppCenter.Analytics.Test.Windows/SessionTrackerTest.cs index 209c91c1c..9091b988a 100644 --- a/Tests/Microsoft.AppCenter.Analytics.Test.Windows/SessionTrackerTest.cs +++ b/Tests/Microsoft.AppCenter.Analytics.Test.Windows/SessionTrackerTest.cs @@ -4,7 +4,6 @@ using Microsoft.AppCenter.Analytics.Channel; using Microsoft.AppCenter.Analytics.Ingestion.Models; using Microsoft.AppCenter.Channel; -using Microsoft.AppCenter.Utils; using Microsoft.VisualStudio.TestTools.UnitTesting; using Moq; @@ -13,9 +12,8 @@ namespace Microsoft.AppCenter.Analytics.Test.Windows [TestClass] public class SessionTrackerTest { - private Mock _mockChannelGroup; private Mock _mockChannel; - private Mock _mockSettings; + private Mock _mockChannelGroup; private SessionTracker _sessionTracker; [TestInitialize] @@ -24,15 +22,15 @@ public void InitializeSessionTrackerTest() _mockChannelGroup = new Mock(); _mockChannel = new Mock(); _mockChannelGroup.Setup( - group => group.AddChannel(It.IsAny(), It.IsAny(), It.IsAny(), It.IsAny())) + group => group.AddChannel(It.IsAny(), It.IsAny(), It.IsAny(), + It.IsAny())) .Returns(_mockChannel.Object); - _mockSettings = new Mock(); - _sessionTracker = new SessionTracker(_mockChannelGroup.Object, _mockChannel.Object, _mockSettings.Object); + _sessionTracker = new SessionTracker(_mockChannelGroup.Object, _mockChannel.Object); SessionTracker.SessionTimeout = 500; } /// - /// Verify that the first call to resume sends a start session log + /// Verify that the first call to resume sends a start session log /// [TestMethod] public void ResumeFirstTime() @@ -43,38 +41,40 @@ public void ResumeFirstTime() } /// - /// Verify that after a timeout, the session tracker sends another start session log + /// Verify that after a timeout, the session tracker sends another start session log /// [TestMethod] public void ResumeAfterTimeout() { _sessionTracker.Resume(); _sessionTracker.Pause(); - Task.Delay((int)SessionTracker.SessionTimeout).Wait(); + Task.Delay((int) SessionTracker.SessionTimeout).Wait(); _sessionTracker.Resume(); _mockChannel.Verify(channel => channel.EnqueueAsync(It.IsAny()), Times.Exactly(2)); } /// - /// Verify that after a timeout, if we resume and send a log at the same time, only 1 new session is started + /// Verify that after a timeout, if we resume and send a log at the same time, only 1 new session is started /// [TestMethod] public void ResumeAfterTimeoutAndSendEvent() { _sessionTracker.Resume(); _sessionTracker.Pause(); - Task.Delay((int)SessionTracker.SessionTimeout).Wait(); + Task.Delay((int) SessionTracker.SessionTimeout).Wait(); _mockChannel.Verify(channel => channel.EnqueueAsync(It.IsAny()), Times.Once()); _sessionTracker.Resume(); - _mockChannelGroup.Raise(group => group.EnqueuingLog += null, null, new EnqueuingLogEventArgs(new EventLog())); + _mockChannelGroup.Raise(group => group.EnqueuingLog += null, null, + new EnqueuingLogEventArgs(new EventLog())); _mockChannel.Verify(channel => channel.EnqueueAsync(It.IsAny()), Times.Exactly(2)); } /// - /// Verify that after a pause that is not long enough to be a timeout, the session tracker does not send a start session log + /// Verify that after a pause that is not long enough to be a timeout, the session tracker does not send a start + /// session log /// [TestMethod] public void ResumeAfterShortPause() @@ -87,27 +87,27 @@ public void ResumeAfterShortPause() } /// - /// Verify that an enqueuing log is handled properly while the tracker is in a session + /// Verify that an enqueuing log is handled properly while the tracker is in a session /// [TestMethod] public void HandleEnqueuingLogDuringSession() { _sessionTracker.Resume(); - var eventLog = new EventLog { Timestamp = DateTime.Now }; + var eventLog = new EventLog {Timestamp = DateTime.Now}; _mockChannelGroup.Raise(group => group.EnqueuingLog += null, null, new EnqueuingLogEventArgs(eventLog)); Assert.IsNotNull(eventLog.Sid); } /// - /// If two logs are enqueued during the same session, they should have the same session id + /// If two logs are enqueued during the same session, they should have the same session id /// [TestMethod] public void HandleEnueuingSecondLogDuringSession() { _sessionTracker.Resume(); var time = DateTime.Now; - var firstLog = new EventLog { Timestamp = time }; - var secondLog = new EventLog { Timestamp = time.AddMilliseconds(1) }; + var firstLog = new EventLog {Timestamp = time}; + var secondLog = new EventLog {Timestamp = time.AddMilliseconds(1)}; _mockChannelGroup.Raise(group => group.EnqueuingLog += null, null, new EnqueuingLogEventArgs(firstLog)); _mockChannelGroup.Raise(group => group.EnqueuingLog += null, null, new EnqueuingLogEventArgs(secondLog)); @@ -116,13 +116,13 @@ public void HandleEnueuingSecondLogDuringSession() } /// - /// Verify that an enqueuing log is adjusted and a session is started when a log is enqueued + /// Verify that an enqueuing log is adjusted and a session is started when a log is enqueued /// [TestMethod] public void HandleEnqueuingLogOutsideSession() { _sessionTracker.Pause(); - var eventLog = new EventLog { Name = "thisisaneventlog" }; + var eventLog = new EventLog {Name = "thisisaneventlog"}; var eventArgs = new EnqueuingLogEventArgs(eventLog); _mockChannelGroup.Raise(group => group.EnqueuingLog += null, null, eventArgs); @@ -131,7 +131,7 @@ public void HandleEnqueuingLogOutsideSession() } /// - /// Verify that when a StartSessionLog is enqueued, a new session is not started + /// Verify that when a StartSessionLog is enqueued, a new session is not started /// [TestMethod] public void HandleEnqueuingStartSessionLog() @@ -145,48 +145,50 @@ public void HandleEnqueuingStartSessionLog() } /// - /// Verify that the session id of the session with the greatest toffset less than or equal to the log toffset is selected - /// (when closest match is less than) + /// Verify that the session id of the session with the greatest toffset less than or equal to the log toffset is + /// selected + /// (when closest match is less than) /// [TestMethod] public void TestSetSessionIdLessThan() { var time = new DateTime(430 * TimeSpan.TicksPerMillisecond); - var log = new EventLog { Timestamp = time }; + var log = new EventLog {Timestamp = time}; var intendedSid = Guid.NewGuid(); - var sessions = new Dictionary { { 4, Guid.Empty }, { 429, intendedSid }, { 431, Guid.Empty } }; + var sessions = new Dictionary {{4, Guid.Empty}, {429, intendedSid}, {431, Guid.Empty}}; var success = SessionTracker.SetExistingSessionId(log, sessions); Assert.IsTrue(success); - Assert.AreEqual(intendedSid, log.Sid.Value); + Assert.AreEqual(intendedSid, log.Sid); } /// - /// Verify that the session id of the session with the greatest toffset less than or equal to the log toffset is selected - /// (when closest match is equal to) + /// Verify that the session id of the session with the greatest toffset less than or equal to the log toffset is + /// selected + /// (when closest match is equal to) /// [TestMethod] public void TestSetSessionIdEqualTo() { var time = new DateTime(430 * TimeSpan.TicksPerMillisecond); - var log = new EventLog { Timestamp = time }; + var log = new EventLog {Timestamp = time}; var intendedSid = Guid.NewGuid(); - var sessions = new Dictionary { { 4, Guid.Empty }, { 430, intendedSid }, { 431, Guid.Empty } }; + var sessions = new Dictionary {{4, Guid.Empty}, {430, intendedSid}, {431, Guid.Empty}}; var success = SessionTracker.SetExistingSessionId(log, sessions); Assert.IsTrue(success); - Assert.AreEqual(intendedSid, log.Sid.Value); + Assert.AreEqual(intendedSid, log.Sid); } /// - /// Verify that when all session id toffsets are greater than that of the log, none is selected + /// Verify that when all session id toffsets are greater than that of the log, none is selected /// [TestMethod] public void TestSetSessionIdNone() { var time = new DateTime(430 * TimeSpan.TicksPerMillisecond); - var log = new EventLog { Timestamp = time }; - var sessions = new Dictionary { { 431, Guid.Empty }, { 632, Guid.Empty }, { 461, Guid.Empty } }; + var log = new EventLog {Timestamp = time}; + var sessions = new Dictionary {{431, Guid.Empty}, {632, Guid.Empty}, {461, Guid.Empty}}; var success = SessionTracker.SetExistingSessionId(log, sessions); Assert.IsFalse(success); @@ -194,35 +196,35 @@ public void TestSetSessionIdNone() } /// - /// Verify session timeout is true if log was never sent and only pause has occurred + /// Verify session timeout is true if log was never sent and only pause has occurred /// [TestMethod] public void HasSessionTimedOutPausedNeverResumed() { - long now = 10; - long lastQueuedLogTime = 0; - long lastResumedTime = 0; - long lastPausedTime = 5; + const long now = 10; + const long lastQueuedLogTime = 0; + const long lastResumedTime = 0; + const long lastPausedTime = 5; Assert.IsTrue(SessionTracker.HasSessionTimedOut(now, lastQueuedLogTime, lastResumedTime, lastPausedTime)); } /// - /// Verify session timeout is false if session tracker was in background for long but a log was just sent + /// Verify session timeout is false if session tracker was in background for long but a log was just sent /// [TestMethod] public void HasSessionTimedOutWasBackgroundForLongAndLogJustSent() { - long now = 1000; - long lastQueuedLogTime = 999; - long lastResumedTime = 998; - long lastPausedTime = 1; + const long now = 1000; + const long lastQueuedLogTime = 999; + const long lastResumedTime = 998; + const long lastPausedTime = 1; Assert.IsFalse(SessionTracker.HasSessionTimedOut(now, lastQueuedLogTime, lastResumedTime, lastPausedTime)); } /// - /// Verify App Center Correlation ID is set when a session starts and current Correlation ID is null + /// Verify App Center Correlation ID is set when a session starts and current Correlation ID is null /// [TestMethod] public void EmptyCorrelationIdIsSetWhenSessionStarts() @@ -239,7 +241,7 @@ public void EmptyCorrelationIdIsSetWhenSessionStarts() } /// - /// Verify Sid is set to initial correlation id when a session starts and Correlation ID has a value + /// Verify Sid is set to initial correlation id when a session starts and Correlation ID has a value /// [TestMethod] public void SidIsInitialCorrelationId() @@ -249,25 +251,63 @@ public void SidIsInitialCorrelationId() var initialCorrelationId = Guid.NewGuid(); AppCenter.Instance.InstanceCorrelationId = initialCorrelationId; _sessionTracker.Resume(); - Assert.AreEqual(_sessionTracker._sid, initialCorrelationId); + Assert.AreEqual(_sessionTracker.Sid, initialCorrelationId); #pragma warning restore CS0612 // Type or member is obsolete } /// - /// Verify App Center Correlation ID is set when the session id changes + /// Verify App Center Correlation ID is set when the session id changes /// [TestMethod] public void VerifyCorrelationIdIsUpdatedWhenSessionChanges() { #pragma warning disable CS0612 // Type or member is obsolete _sessionTracker.Resume(); + var sid1 = _sessionTracker.Sid; + Assert.AreNotEqual(Guid.Empty, sid1); + + // Cause session expiration and start new session. + _sessionTracker.Pause(); + Task.Delay((int) SessionTracker.SessionTimeout).Wait(); + _sessionTracker.Resume(); + Assert.IsTrue(AppCenter.TestAndSetCorrelationId(_sessionTracker.Sid, + ref AppCenter.Instance.InstanceCorrelationId)); +#pragma warning restore CS0612 // Type or member is obsolete + + // Verify second session has a different identifier. + var sid2 = _sessionTracker.Sid; + Assert.AreNotEqual(Guid.Empty, sid2); + Assert.AreNotEqual(sid1, sid2); + } + + /// + /// Verify App Center session identifier changes on new session if someone else change correlation identifier. + /// + [TestMethod] + public void VerifySessionChangesOnCorrelationIdUpdatedByOthers() + { +#pragma warning disable CS0612 // Type or member is obsolete + _sessionTracker.Resume(); + var sid1 = _sessionTracker.Sid; + Assert.AreNotEqual(Guid.Empty, sid1); // Cause session expiration and start new session. _sessionTracker.Pause(); Task.Delay((int)SessionTracker.SessionTimeout).Wait(); + + // Change correlation identifier. + var externalCorrelationid = Guid.NewGuid(); + Assert.IsTrue(AppCenter.TestAndSetCorrelationId(_sessionTracker.Sid, + ref externalCorrelationid)); + _sessionTracker.Resume(); - Assert.IsTrue(AppCenter.TestAndSetCorrelationId(_sessionTracker._sid, ref AppCenter.Instance.InstanceCorrelationId)); #pragma warning restore CS0612 // Type or member is obsolete + + // Verify second session has a different identifier, not the new one analytics wanted but the updated correlation identifier instead. + var sid2 = _sessionTracker.Sid; + Assert.AreNotEqual(Guid.Empty, sid2); + Assert.AreNotEqual(sid1, sid2); + Assert.AreEqual(externalCorrelationid, sid2); } } -} +} \ No newline at end of file From edaae668f347d561af6bf18035d4be8ca91797e3 Mon Sep 17 00:00:00 2001 From: Ivan Matkov Date: Sat, 7 Apr 2018 15:29:43 +0300 Subject: [PATCH 26/46] Update nuspecs --- nuget/AppCenter.nuspec | 4 ++-- nuget/AppCenterAnalytics.nuspec | 2 +- nuget/AppCenterCrashes.nuspec | 4 ++-- nuget/WindowsAppCenter.nuspec | 6 +++--- nuget/WindowsAppCenterAnalytics.nuspec | 2 +- nuget/WindowsAppCenterCrashes.nuspec | 4 ++-- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/nuget/AppCenter.nuspec b/nuget/AppCenter.nuspec index ed38c1080..16b37f7e6 100644 --- a/nuget/AppCenter.nuspec +++ b/nuget/AppCenter.nuspec @@ -20,7 +20,7 @@ - + @@ -54,6 +54,6 @@ - + diff --git a/nuget/AppCenterAnalytics.nuspec b/nuget/AppCenterAnalytics.nuspec index 41f1649b3..33638d89b 100644 --- a/nuget/AppCenterAnalytics.nuspec +++ b/nuget/AppCenterAnalytics.nuspec @@ -40,7 +40,7 @@ - + diff --git a/nuget/AppCenterCrashes.nuspec b/nuget/AppCenterCrashes.nuspec index 23963c5fe..1f72a3dc3 100644 --- a/nuget/AppCenterCrashes.nuspec +++ b/nuget/AppCenterCrashes.nuspec @@ -37,13 +37,13 @@ - + - + diff --git a/nuget/WindowsAppCenter.nuspec b/nuget/WindowsAppCenter.nuspec index 9bad3ed6a..e25e8de36 100644 --- a/nuget/WindowsAppCenter.nuspec +++ b/nuget/WindowsAppCenter.nuspec @@ -20,7 +20,7 @@ - + @@ -28,8 +28,8 @@ - + - + diff --git a/nuget/WindowsAppCenterAnalytics.nuspec b/nuget/WindowsAppCenterAnalytics.nuspec index bd1052d00..984584b38 100644 --- a/nuget/WindowsAppCenterAnalytics.nuspec +++ b/nuget/WindowsAppCenterAnalytics.nuspec @@ -22,6 +22,6 @@ - + diff --git a/nuget/WindowsAppCenterCrashes.nuspec b/nuget/WindowsAppCenterCrashes.nuspec index 6f842543e..5138069dc 100644 --- a/nuget/WindowsAppCenterCrashes.nuspec +++ b/nuget/WindowsAppCenterCrashes.nuspec @@ -22,13 +22,13 @@ - + - + From 371c47ee409430c6ec8a0e026f303e9143ace478 Mon Sep 17 00:00:00 2001 From: Ivan Matkov Date: Mon, 9 Apr 2018 11:49:31 +0300 Subject: [PATCH 27/46] Update target in WinForms test apps --- Apps/Contoso.WinForms.Demo/App.config | 6 +-- .../Contoso.WinForms.Demo.csproj | 3 +- .../Properties/Resources.Designer.cs | 44 ++++++++----------- .../Properties/Settings.Designer.cs | 22 ++++------ Apps/Contoso.WinForms.Demo/project.json | 2 +- Apps/Contoso.WinForms.Puppet/App.config | 2 +- .../Contoso.WinForms.Puppet.csproj | 2 +- .../Properties/Resources.Designer.cs | 4 +- .../Properties/Settings.Designer.cs | 4 +- Apps/Contoso.WinForms.Puppet/project.json | 2 +- 10 files changed, 40 insertions(+), 51 deletions(-) diff --git a/Apps/Contoso.WinForms.Demo/App.config b/Apps/Contoso.WinForms.Demo/App.config index 88fa4027b..d1428ad71 100644 --- a/Apps/Contoso.WinForms.Demo/App.config +++ b/Apps/Contoso.WinForms.Demo/App.config @@ -1,6 +1,6 @@ - + - + - \ No newline at end of file + diff --git a/Apps/Contoso.WinForms.Demo/Contoso.WinForms.Demo.csproj b/Apps/Contoso.WinForms.Demo/Contoso.WinForms.Demo.csproj index af11e61e1..4d0ea68ad 100644 --- a/Apps/Contoso.WinForms.Demo/Contoso.WinForms.Demo.csproj +++ b/Apps/Contoso.WinForms.Demo/Contoso.WinForms.Demo.csproj @@ -8,9 +8,10 @@ WinExe Contoso.WinForms.Demo Contoso.WinForms.Demo - v4.5.2 + v4.5 512 true + AnyCPU diff --git a/Apps/Contoso.WinForms.Demo/Properties/Resources.Designer.cs b/Apps/Contoso.WinForms.Demo/Properties/Resources.Designer.cs index b4caafebc..e527abbc4 100644 --- a/Apps/Contoso.WinForms.Demo/Properties/Resources.Designer.cs +++ b/Apps/Contoso.WinForms.Demo/Properties/Resources.Designer.cs @@ -8,10 +8,10 @@ // //------------------------------------------------------------------------------ -namespace Contoso.WinForms.Demo.Properties -{ - - +namespace Contoso.WinForms.Demo.Properties { + using System; + + /// /// A strongly-typed resource class, for looking up localized strings, etc. /// @@ -19,51 +19,43 @@ namespace Contoso.WinForms.Demo.Properties // class via a tool like ResGen or Visual Studio. // To add or remove a member, edit your .ResX file then rerun ResGen // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - internal class Resources - { - + internal class Resources { + private static global::System.Resources.ResourceManager resourceMan; - + private static global::System.Globalization.CultureInfo resourceCulture; - + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] - internal Resources() - { + internal Resources() { } - + /// /// Returns the cached ResourceManager instance used by this class. /// [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Resources.ResourceManager ResourceManager - { - get - { - if ((resourceMan == null)) - { + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Contoso.WinForms.Demo.Properties.Resources", typeof(Resources).Assembly); resourceMan = temp; } return resourceMan; } } - + /// /// Overrides the current thread's CurrentUICulture property for all /// resource lookups using this strongly typed resource class. /// [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Globalization.CultureInfo Culture - { - get - { + internal static global::System.Globalization.CultureInfo Culture { + get { return resourceCulture; } - set - { + set { resourceCulture = value; } } diff --git a/Apps/Contoso.WinForms.Demo/Properties/Settings.Designer.cs b/Apps/Contoso.WinForms.Demo/Properties/Settings.Designer.cs index a16bfc753..45db7c05d 100644 --- a/Apps/Contoso.WinForms.Demo/Properties/Settings.Designer.cs +++ b/Apps/Contoso.WinForms.Demo/Properties/Settings.Designer.cs @@ -8,21 +8,17 @@ // //------------------------------------------------------------------------------ -namespace Contoso.WinForms.Demo.Properties -{ - - +namespace Contoso.WinForms.Demo.Properties { + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] - internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase - { - + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.6.0.0")] + internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { + private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); - - public static Settings Default - { - get - { + + public static Settings Default { + get { return defaultInstance; } } diff --git a/Apps/Contoso.WinForms.Demo/project.json b/Apps/Contoso.WinForms.Demo/project.json index 3b5e3b06f..714d6c18f 100644 --- a/Apps/Contoso.WinForms.Demo/project.json +++ b/Apps/Contoso.WinForms.Demo/project.json @@ -4,7 +4,7 @@ "Microsoft.AppCenter.Crashes": "1.5.0" }, "frameworks": { - "net452": {} + "net45": {} }, "runtimes": { "win": {} diff --git a/Apps/Contoso.WinForms.Puppet/App.config b/Apps/Contoso.WinForms.Puppet/App.config index 8227adb98..d1428ad71 100644 --- a/Apps/Contoso.WinForms.Puppet/App.config +++ b/Apps/Contoso.WinForms.Puppet/App.config @@ -1,6 +1,6 @@ - + diff --git a/Apps/Contoso.WinForms.Puppet/Contoso.WinForms.Puppet.csproj b/Apps/Contoso.WinForms.Puppet/Contoso.WinForms.Puppet.csproj index 22bc83831..73a9e1e05 100644 --- a/Apps/Contoso.WinForms.Puppet/Contoso.WinForms.Puppet.csproj +++ b/Apps/Contoso.WinForms.Puppet/Contoso.WinForms.Puppet.csproj @@ -8,7 +8,7 @@ WinExe Contoso.WinForms.Puppet Contoso.WinForms.Puppet - v4.5.2 + v4.5 512 true false diff --git a/Apps/Contoso.WinForms.Puppet/Properties/Resources.Designer.cs b/Apps/Contoso.WinForms.Puppet/Properties/Resources.Designer.cs index 81ae7ad81..04a675eb0 100644 --- a/Apps/Contoso.WinForms.Puppet/Properties/Resources.Designer.cs +++ b/Apps/Contoso.WinForms.Puppet/Properties/Resources.Designer.cs @@ -8,7 +8,7 @@ // //------------------------------------------------------------------------------ -namespace Contoso.WinForms.Demo.Properties { +namespace Contoso.WinForms.Puppet.Properties { using System; @@ -19,7 +19,7 @@ namespace Contoso.WinForms.Demo.Properties { // class via a tool like ResGen or Visual Studio. // To add or remove a member, edit your .ResX file then rerun ResGen // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] internal class Resources { diff --git a/Apps/Contoso.WinForms.Puppet/Properties/Settings.Designer.cs b/Apps/Contoso.WinForms.Puppet/Properties/Settings.Designer.cs index a73de79d7..4fc6c59a6 100644 --- a/Apps/Contoso.WinForms.Puppet/Properties/Settings.Designer.cs +++ b/Apps/Contoso.WinForms.Puppet/Properties/Settings.Designer.cs @@ -8,11 +8,11 @@ // //------------------------------------------------------------------------------ -namespace Contoso.WinForms.Demo.Properties { +namespace Contoso.WinForms.Puppet.Properties { [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.1.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.6.0.0")] internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); diff --git a/Apps/Contoso.WinForms.Puppet/project.json b/Apps/Contoso.WinForms.Puppet/project.json index e0cf888d4..cac48da3c 100644 --- a/Apps/Contoso.WinForms.Puppet/project.json +++ b/Apps/Contoso.WinForms.Puppet/project.json @@ -3,7 +3,7 @@ "sqlite-net-pcl": "1.3.1" }, "frameworks": { - "net452": {} + "net45": {} }, "runtimes": { "win": {} From 53676a306d331a1e526e04aa710239c5059ebca4 Mon Sep 17 00:00:00 2001 From: Guillaume Perrot Date: Mon, 9 Apr 2018 17:23:45 -0700 Subject: [PATCH 28/46] Fix capturing exceptions from .NET threads in Android --- .../ModulePages/CrashesFragment.cs | 9 +++ .../Resources/layout/Crashes.axml | 5 ++ .../Resources/values/Strings.xml | 75 ++++++++++--------- .../Crashes.cs | 43 +++++++++-- 4 files changed, 87 insertions(+), 45 deletions(-) diff --git a/Apps/Contoso.Android.Puppet/ModulePages/CrashesFragment.cs b/Apps/Contoso.Android.Puppet/ModulePages/CrashesFragment.cs index 469f924fc..217bc43b5 100644 --- a/Apps/Contoso.Android.Puppet/ModulePages/CrashesFragment.cs +++ b/Apps/Contoso.Android.Puppet/ModulePages/CrashesFragment.cs @@ -1,5 +1,6 @@ using System; using System.IO; +using System.Threading; using Android.Content; using Android.OS; using Android.Views; @@ -19,6 +20,7 @@ public class CrashesFragment : PageFragment private Button CrashWithNullReferenceExceptionButton; private Button CatchNullReferenceExceptionButton; private Button CrashAsyncButton; + private Button CrashDotNetThreadButton; private Button CrashSuperNotCalledButton; private Button CrashJavaFromDotNetButton; @@ -39,6 +41,7 @@ public override void OnViewCreated(View view, Bundle savedInstanceState) CrashWithNullReferenceExceptionButton = view.FindViewById(Resource.Id.crash_with_null_reference_exception) as Button; CatchNullReferenceExceptionButton = view.FindViewById(Resource.Id.catch_null_reference_exception) as Button; CrashAsyncButton = view.FindViewById(Resource.Id.crash_async) as Button; + CrashDotNetThreadButton = view.FindViewById(Resource.Id.crash_from_dotnet_thread) as Button; CrashSuperNotCalledButton = view.FindViewById(Resource.Id.crash_super_not_called) as Button; CrashJavaFromDotNetButton = view.FindViewById(Resource.Id.crash_java_from_dotnet) as Button; @@ -50,6 +53,7 @@ public override void OnViewCreated(View view, Bundle savedInstanceState) CrashWithNullReferenceExceptionButton.Click += CrashWithNullReferenceException; CatchNullReferenceExceptionButton.Click += CatchNullReferenceException; CrashAsyncButton.Click += CrashAsync; + CrashDotNetThreadButton.Click += CrashDotNetThread; CrashSuperNotCalledButton.Click += CrashSuperNotCalled; CrashJavaFromDotNetButton.Click += CrashJavaFromDotNet; @@ -123,6 +127,11 @@ async private void CrashAsync(object sender, EventArgs e) await FakeService.DoStuffInBackground(); } + private void CrashDotNetThread(object sender, EventArgs e) + { + new Thread(() => throw new Exception("oops")).Start(); + } + private void CrashSuperNotCalled(object sender, EventArgs e) { StartActivity(new Intent(Activity, typeof(CrashActivity))); diff --git a/Apps/Contoso.Android.Puppet/Resources/layout/Crashes.axml b/Apps/Contoso.Android.Puppet/Resources/layout/Crashes.axml index a1f49ce21..444e2cc98 100644 --- a/Apps/Contoso.Android.Puppet/Resources/layout/Crashes.axml +++ b/Apps/Contoso.Android.Puppet/Resources/layout/Crashes.axml @@ -60,6 +60,11 @@ android:text="@string/CrashAsync" android:layout_width="match_parent" android:layout_height="wrap_content" /> + [TestMethod] - public void NetworkStateIngestionOffline() + public async Task NetworkStateIngestionOffline() { - var call = PrepareServiceCall(); SetupAdapterSendResponse(HttpStatusCode.OK); _networkState.IsConnected = false; - var completedInTime = false; - _networkStateIngestion.ExecuteCallAsync(call).ContinueWith(task => completedInTime = true); - Task.Delay(TimeSpan.FromSeconds(5)).Wait(); - Assert.IsFalse(completedInTime); + var call = _networkStateIngestion.Call(AppSecret, InstallId, Logs); + await Task.Delay(TimeSpan.FromSeconds(3)); + Assert.IsFalse(call.IsCompleted); VerifyAdapterSend(Times.Never()); } @@ -77,15 +59,16 @@ public void NetworkStateIngestionOffline() /// Verify that call resent when network is available again. /// [TestMethod] - public void NetworkStateIngestionComeBackOnline() + public async Task NetworkStateIngestionComeBackOnline() { - var call = PrepareServiceCall(); SetupAdapterSendResponse(HttpStatusCode.OK); _networkState.IsConnected = false; - var task = _networkStateIngestion.ExecuteCallAsync(call); + var call = _networkStateIngestion.Call(AppSecret, InstallId, Logs); + await Task.Delay(TimeSpan.FromSeconds(3)); + Assert.IsFalse(call.IsCompleted); VerifyAdapterSend(Times.Never()); _networkState.IsConnected = true; - task.Wait(); + await call.ToTask(); VerifyAdapterSend(Times.Once()); } @@ -93,36 +76,22 @@ public void NetworkStateIngestionComeBackOnline() /// Verify that multiple calls are resent when network is available again. /// [TestMethod] - public void NetworkStateIngestionComeBackOnlineMultipleCalls() + public async Task NetworkStateIngestionComeBackOnlineMultipleCalls() { - int numCalls = 5; - var calls = new List(); - for (int i = 0; i < numCalls; ++i) - { - calls.Add(PrepareServiceCall()); - } + const int CallsCount = 5; SetupAdapterSendResponse(HttpStatusCode.OK); _networkState.IsConnected = false; - - var tasks = new List(); - foreach (var call in calls) + var calls = new List(); + for (var i = 0; i < CallsCount; ++i) { - tasks.Add(_networkStateIngestion.ExecuteCallAsync(call)); + calls.Add(_networkStateIngestion.Call(AppSecret, InstallId, Logs)); } + await Task.Delay(TimeSpan.FromSeconds(3)); + Assert.IsFalse(calls.Any(call => call.IsCompleted)); _networkState.IsConnected = true; - Task.WaitAll(tasks.ToArray()); - VerifyAdapterSend(Times.Exactly(numCalls)); - } - - /// - /// Helper for prepare ServiceCall. - /// - private IServiceCall PrepareServiceCall() - { - var appSecret = Guid.NewGuid().ToString(); - var installId = Guid.NewGuid(); - var logs = new List(); - return _networkStateIngestion.PrepareServiceCall(appSecret, installId, logs); + await Task.WhenAll(calls.Select(call => call.ToTask())); + VerifyAdapterSend(Times.Exactly(CallsCount)); + calls.ForEach(call => call.Dispose()); } } } diff --git a/Tests/Microsoft.AppCenter.Test.Windows/Ingestion/Http/RetryableTest.cs b/Tests/Microsoft.AppCenter.Test.Windows/Ingestion/Http/RetryableTest.cs index d32725f1c..72f348a19 100644 --- a/Tests/Microsoft.AppCenter.Test.Windows/Ingestion/Http/RetryableTest.cs +++ b/Tests/Microsoft.AppCenter.Test.Windows/Ingestion/Http/RetryableTest.cs @@ -1,64 +1,40 @@ using System; -using System.Collections.Generic; using System.Net; using System.Threading.Tasks; using Microsoft.AppCenter.Ingestion; using Microsoft.AppCenter.Ingestion.Http; -using Microsoft.AppCenter.Ingestion.Models; using Microsoft.VisualStudio.TestTools.UnitTesting; using Moq; -namespace Microsoft.AppCenter.Test.Ingestion.Http +namespace Microsoft.AppCenter.Test.Windows.Ingestion.Http { [TestClass] public class RetryableTest : HttpIngestionTest { - private TestInterval[] _intervals; + private static readonly TimeSpan[] Intervals = + { + TimeSpan.FromSeconds(1), + TimeSpan.FromSeconds(1), + TimeSpan.FromSeconds(1) + }; private IIngestion _retryableIngestion; [TestInitialize] public void InitializeRetryableTest() { _adapter = new Mock(); - _intervals = new[] - { - new TestInterval(), - new TestInterval(), - new TestInterval() - }; - var retryIntervals = new Func[_intervals.Length]; - for (int i = 0; i < _intervals.Length; i++) - { - retryIntervals[i] = _intervals[i].Wait; - } - _retryableIngestion = new RetryableIngestion(new IngestionHttp(_adapter.Object), retryIntervals); - } - - /// - /// Verify that ingestion create ServiceCall correctly. - /// - [TestMethod] - public void RetryableIngestionPrepareServiceCall() - { - var appSecret = Guid.NewGuid().ToString(); - var installId = Guid.NewGuid(); - var logs = new List(); - var call = _retryableIngestion.PrepareServiceCall(appSecret, installId, logs); - Assert.IsInstanceOfType(call, typeof(RetryableServiceCall)); - Assert.AreEqual(call.AppSecret, appSecret); - Assert.AreEqual(call.InstallId, installId); - Assert.AreEqual(call.Logs, logs); + _retryableIngestion = new RetryableIngestion(new IngestionHttp(_adapter.Object), Intervals); } /// /// Verify behaviour without exceptions. /// [TestMethod] - public void RetryableIngestionSuccess() + public async Task RetryableIngestionSuccess() { - var call = PrepareServiceCall(); SetupAdapterSendResponse(HttpStatusCode.OK); - _retryableIngestion.ExecuteCallAsync(call).RunNotAsync(); + var call = _retryableIngestion.Call(AppSecret, InstallId, Logs); + await call.ToTask(); VerifyAdapterSend(Times.Once()); // No throw any exception @@ -68,23 +44,18 @@ public void RetryableIngestionSuccess() /// Verify that retrying on recoverable exceptions. /// [TestMethod] - public void RetryableIngestionRepeat1() + public async Task RetryableIngestionRepeat1() { - var call = PrepareServiceCall(); // RequestTimeout - retryable - SetupAdapterSendResponse(HttpStatusCode.RequestTimeout); - // Run code after this interval immideatly - _intervals[0].Set(); - // On first delay: replace response (next will be succeed) - _intervals[0].OnRequest += () => SetupAdapterSendResponse(HttpStatusCode.OK); - // Checks send times on N delay moment - _intervals[0].OnRequest += () => VerifyAdapterSend(Times.Once()); - _intervals[1].OnRequest += () => Assert.Fail(); - - // Run all chain not async - _retryableIngestion.ExecuteCallAsync(call).RunNotAsync(); - - // Must be sent 2 times: 1 - main, 1 - repeat + SetupAdapterSendResponse(HttpStatusCode.RequestTimeout, HttpStatusCode.OK); + var start = DateTime.Now; + var call = _retryableIngestion.Call(AppSecret, InstallId, Logs); + await Task.Delay(start.AddSeconds(0.5) - DateTime.Now); + Assert.IsFalse(call.IsCompleted); + VerifyAdapterSend(Times.Exactly(1)); + + await Task.Delay(start.AddSeconds(1.5) - DateTime.Now); + Assert.IsTrue(call.IsCompleted); VerifyAdapterSend(Times.Exactly(2)); } @@ -92,26 +63,26 @@ public void RetryableIngestionRepeat1() /// Verify that retrying on recoverable exceptions. /// [TestMethod] - public void RetryableIngestionRepeat3() + public async Task RetryableIngestionRepeat3() { - var call = PrepareServiceCall(); // RequestTimeout - retryable - SetupAdapterSendResponse(HttpStatusCode.RequestTimeout); - // Run code after this intervals immideatly - _intervals[0].Set(); - _intervals[1].Set(); - _intervals[2].Set(); - // On third delay: replace response (next will be succeed) - _intervals[2].OnRequest += () => SetupAdapterSendResponse(HttpStatusCode.OK); - // Checks send times on N delay moment - _intervals[0].OnRequest += () => VerifyAdapterSend(Times.Once()); - _intervals[1].OnRequest += () => VerifyAdapterSend(Times.Exactly(2)); - _intervals[2].OnRequest += () => VerifyAdapterSend(Times.Exactly(3)); - - // Run all chain not async - _retryableIngestion.ExecuteCallAsync(call).RunNotAsync(); - - // Must be sent 4 times: 1 - main, 3 - repeat + SetupAdapterSendResponse(HttpStatusCode.RequestTimeout, HttpStatusCode.RequestTimeout, HttpStatusCode.RequestTimeout, HttpStatusCode.OK); + var start = DateTime.Now; + var call = _retryableIngestion.Call(AppSecret, InstallId, Logs); + await Task.Delay(start.AddSeconds(0.5) - DateTime.Now); + Assert.IsFalse(call.IsCompleted); + VerifyAdapterSend(Times.Exactly(1)); + + await Task.Delay(start.AddSeconds(1.5) - DateTime.Now); + Assert.IsFalse(call.IsCompleted); + VerifyAdapterSend(Times.Exactly(2)); + + await Task.Delay(start.AddSeconds(2.5) - DateTime.Now); + Assert.IsFalse(call.IsCompleted); + VerifyAdapterSend(Times.Exactly(3)); + + await Task.Delay(start.AddSeconds(3.5) - DateTime.Now); + Assert.IsTrue(call.IsCompleted); VerifyAdapterSend(Times.Exactly(4)); } @@ -119,108 +90,47 @@ public void RetryableIngestionRepeat3() /// Verify service call canceling. /// [TestMethod] - public void RetryableIngestionCancel() + public async Task RetryableIngestionCancel() { - var call = PrepareServiceCall(); // RequestTimeout - retryable SetupAdapterSendResponse(HttpStatusCode.RequestTimeout); - // Run code after this intervals immideatly - _intervals[0].Set(); - _intervals[1].Set(); - // On second delay: cancel call - _intervals[1].OnRequest += () => call.Cancel(); - // Checks send times on N delay moment - _intervals[0].OnRequest += () => VerifyAdapterSend(Times.Once()); - _intervals[2].OnRequest += () => Assert.Fail(); - - // Run all chain not async - Assert.ThrowsException(() => _retryableIngestion.ExecuteCallAsync(call).RunNotAsync()); - - // Must be sent 2 times: 1 - main, 1 - repeat + var start = DateTime.Now; + var call = _retryableIngestion.Call(AppSecret, InstallId, Logs); + await Task.Delay(start.AddSeconds(0.5) - DateTime.Now); + Assert.IsFalse(call.IsCompleted); + VerifyAdapterSend(Times.Exactly(1)); + + await Task.Delay(start.AddSeconds(1.5) - DateTime.Now); + Assert.IsFalse(call.IsCompleted); + VerifyAdapterSend(Times.Exactly(2)); + + call.Cancel(); + + await Task.Delay(start.AddSeconds(2.5) - DateTime.Now); + Assert.IsFalse(call.IsCompleted); VerifyAdapterSend(Times.Exactly(2)); + await Assert.ThrowsExceptionAsync(() => call.ToTask()); } /// /// Verify that not retrying not recoverable exceptions. /// [TestMethod] - public void RetryableIngestionException() + public async Task RetryableIngestionException() { - var call = PrepareServiceCall(); SetupAdapterSendResponse(HttpStatusCode.BadRequest); - Assert.ThrowsException(() => _retryableIngestion.ExecuteCallAsync(call).RunNotAsync()); + var call = _retryableIngestion.Call(AppSecret, InstallId, Logs); + await Assert.ThrowsExceptionAsync(() => call.ToTask()); VerifyAdapterSend(Times.Once()); } - [TestMethod] - public void ServiceCallSuccessCallbackTest() - { - SetupAdapterSendResponse(HttpStatusCode.OK); - var call = PrepareServiceCall(); - call.ExecuteAsync().RunNotAsync(); - - // No throw any exception - } - - [TestMethod] - public void ServiceCallFailedCallbackTest() - { - SetupAdapterSendResponse(HttpStatusCode.NotFound); - var call = PrepareServiceCall(); - Assert.ThrowsException(() => { call.ExecuteAsync().RunNotAsync(); }); - } - /// /// Validate that constructor throws correct exception type with nullable timespan array /// [TestMethod] public void RetryableIngestionWithNullIntervals() { - TimeSpan[] timeSpans = null; - Assert.ThrowsException(() => { new RetryableIngestion(new IngestionHttp(_adapter.Object), timeSpans); }); - } - - /// - /// Validate that constructor throws correct exception type with nullable timespan array - /// - [TestMethod] - public void RetryableIngestionWithNullFunc() - { - Func[] funcs = null; - Assert.ThrowsException(() => { new RetryableIngestion(new IngestionHttp(_adapter.Object), funcs); }); - } - - /// - /// Validate that function doesn't throw any exception - /// - [TestMethod] - public void CallExecuteAsyncWhenCallIsNotOfTypeRetryableServiceCall() - { - var mockServiceCall = new Mock(); - _retryableIngestion.ExecuteCallAsync(new TestServiceCall(mockServiceCall.Object)); - - // No throw any exception - } - - /// - /// Helper for prepare ServiceCall. - /// - private IServiceCall PrepareServiceCall() - { - var appSecret = Guid.NewGuid().ToString(); - var installId = Guid.NewGuid(); - var logs = new List(); - return _retryableIngestion.PrepareServiceCall(appSecret, installId, logs); - } - - public class TestInterval - { - private volatile TaskCompletionSource _task = new TaskCompletionSource(); - - public event Action OnRequest; - - public Task Wait() { OnRequest?.Invoke(); return _task.Task; } - public void Set() => _task.TrySetResult(true); + Assert.ThrowsException(() => new RetryableIngestion(new IngestionHttp(_adapter.Object), null)); } } } diff --git a/Tests/Microsoft.AppCenter.Test.Windows/Ingestion/Http/ServiceCallTest.cs b/Tests/Microsoft.AppCenter.Test.Windows/Ingestion/Http/ServiceCallTest.cs deleted file mode 100644 index a201111e6..000000000 --- a/Tests/Microsoft.AppCenter.Test.Windows/Ingestion/Http/ServiceCallTest.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System; -using Microsoft.AppCenter.Ingestion.Http; -using Microsoft.VisualStudio.TestTools.UnitTesting; -using Microsoft.AppCenter.Ingestion; - -namespace Microsoft.AppCenter.Test.Windows.Ingestion.Http -{ - [TestClass] - public class ServiceCallTest - { - private MockIngestion _ingestion; - private ServiceCall _serviceCall; - - [TestInitialize] - public void InitializeServiceCallTest() - { - _ingestion = new MockIngestion(); - _serviceCall = new MockServiceCall(_ingestion, null, string.Empty, Guid.NewGuid()); - } - - [TestMethod] - public void CheckSuccessCallback() - { - _ingestion.CallShouldSucceed = true; - - _serviceCall.ExecuteAsync().RunNotAsync(); - } - - [TestMethod] - public void CheckUnsuccessCallback() - { - _ingestion.CallShouldSucceed = false; - Assert.ThrowsException(() => _serviceCall.ExecuteAsync().RunNotAsync()); - } - } -} diff --git a/Tests/Microsoft.AppCenter.Test.Windows/Ingestion/Http/TestServiceCall.cs b/Tests/Microsoft.AppCenter.Test.Windows/Ingestion/Http/TestServiceCall.cs deleted file mode 100644 index ab34e4c3c..000000000 --- a/Tests/Microsoft.AppCenter.Test.Windows/Ingestion/Http/TestServiceCall.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace Microsoft.AppCenter.Ingestion.Http -{ - public class TestServiceCall : ServiceCallDecorator - { - public TestServiceCall(IServiceCall decoratedApi) : base(decoratedApi) - { - } - } -} diff --git a/Tests/Microsoft.AppCenter.Test.Windows/Ingestion/ServiceCallTest.cs b/Tests/Microsoft.AppCenter.Test.Windows/Ingestion/ServiceCallTest.cs new file mode 100644 index 000000000..7b0c84a97 --- /dev/null +++ b/Tests/Microsoft.AppCenter.Test.Windows/Ingestion/ServiceCallTest.cs @@ -0,0 +1,154 @@ +using System; +using System.Collections.Generic; +using Microsoft.AppCenter.Ingestion; +using Microsoft.AppCenter.Ingestion.Models; +using Microsoft.VisualStudio.TestTools.UnitTesting; + +namespace Microsoft.AppCenter.Test.Windows.Ingestion +{ + [TestClass] + public class ServiceCallTest + { + private ServiceCall _serviceCall; + + [TestInitialize] + public void InitializeServiceCallTest() + { + var appSecret = Guid.NewGuid().ToString(); + var installId = Guid.NewGuid(); + var logs = new List(); + _serviceCall = new ServiceCall(appSecret, installId, logs); + Assert.AreEqual(appSecret, _serviceCall.AppSecret); + Assert.AreEqual(installId, _serviceCall.InstallId); + Assert.AreEqual(logs, _serviceCall.Logs); + Assert.IsFalse(_serviceCall.IsCompleted); + Assert.IsFalse(_serviceCall.IsCanceled); + Assert.IsFalse(_serviceCall.IsFaulted); + } + + [TestMethod] + public void ServiceCallSucceeded() + { + var continueWith = 0; + _serviceCall.ContinueWith(serviceCall => + { + Assert.AreEqual(_serviceCall, serviceCall); + Assert.IsTrue(serviceCall.IsCompleted); + continueWith++; + }); + Assert.AreEqual(0, continueWith); + _serviceCall.SetResult("Test"); + Assert.AreEqual(1, continueWith); + Assert.IsTrue(_serviceCall.IsCompleted); + Assert.IsFalse(_serviceCall.IsCanceled); + Assert.IsFalse(_serviceCall.IsFaulted); + Assert.AreEqual("Test", _serviceCall.Result); + Assert.IsNull(_serviceCall.Exception); + + // Check copy state. + var copy = new ServiceCall(); + copy.CopyState(_serviceCall); + Assert.IsTrue(copy.IsCompleted); + Assert.IsFalse(copy.IsCanceled); + Assert.IsFalse(copy.IsFaulted); + Assert.AreEqual("Test", copy.Result); + Assert.IsNull(copy.Exception); + } + + [TestMethod] + public void ServiceCallFaulted() + { + var continueWith = 0; + var exeption = new CancellationException(); + _serviceCall.ContinueWith(serviceCall => + { + Assert.AreEqual(_serviceCall, serviceCall); + Assert.IsTrue(serviceCall.IsCompleted); + continueWith++; + }); + Assert.AreEqual(0, continueWith); + _serviceCall.SetException(exeption); + Assert.AreEqual(1, continueWith); + Assert.IsTrue(_serviceCall.IsCompleted); + Assert.IsFalse(_serviceCall.IsCanceled); + Assert.IsTrue(_serviceCall.IsFaulted); + Assert.IsNull(_serviceCall.Result); + Assert.AreEqual(exeption, _serviceCall.Exception); + + // Check copy state. + var copy = new ServiceCall(); + copy.CopyState(_serviceCall); + Assert.IsTrue(copy.IsCompleted); + Assert.IsFalse(copy.IsCanceled); + Assert.IsTrue(copy.IsFaulted); + Assert.IsNull(copy.Result); + Assert.AreEqual(exeption, copy.Exception); + } + + [TestMethod] + public void ServiceCallCanceled() + { + var continueWith = 0; + _serviceCall.ContinueWith(serviceCall => + { + Assert.AreEqual(_serviceCall, serviceCall); + Assert.IsTrue(serviceCall.IsCanceled); + continueWith++; + }); + Assert.AreEqual(0, continueWith); + _serviceCall.Cancel(); + Assert.AreEqual(1, continueWith); + Assert.IsFalse(_serviceCall.IsCompleted); + Assert.IsTrue(_serviceCall.IsCanceled); + Assert.IsFalse(_serviceCall.IsFaulted); + Assert.IsNull(_serviceCall.Result); + Assert.IsNull(_serviceCall.Exception); + + // Check copy state. + var copy = new ServiceCall(); + copy.CopyState(_serviceCall); + Assert.IsFalse(copy.IsCompleted); + Assert.IsTrue(copy.IsCanceled); + Assert.IsFalse(copy.IsFaulted); + Assert.IsNull(copy.Result); + Assert.IsNull(copy.Exception); + } + + [TestMethod] + public void ServiceCallContinueWith() + { + var continueWith1 = 0; + var continueWith2 = 0; + _serviceCall.ContinueWith(serviceCall => + { + Assert.AreEqual(_serviceCall, serviceCall); + Assert.IsTrue(_serviceCall.IsCompleted); + continueWith1++; + }); + Assert.AreEqual(0, continueWith1); + Assert.AreEqual(0, continueWith2); + _serviceCall.SetResult("Test"); + Assert.AreEqual(1, continueWith1); + Assert.AreEqual(0, continueWith2); + _serviceCall.ContinueWith(serviceCall => + { + Assert.AreEqual(_serviceCall, serviceCall); + Assert.IsTrue(_serviceCall.IsCompleted); + continueWith2++; + }); + Assert.AreEqual(1, continueWith1); + Assert.AreEqual(1, continueWith2); + } + + [TestMethod] + public void ServiceCallDisposed() + { + _serviceCall.Dispose(); + Assert.ThrowsException(() => _serviceCall.SetResult("")); + Assert.ThrowsException(() => _serviceCall.SetException(new AppCenterException(""))); + Assert.ThrowsException(() => _serviceCall.ContinueWith(_ => {})); + Assert.ThrowsException(() => _serviceCall.CopyState(new ServiceCall())); + Assert.ThrowsException(() => _serviceCall.Cancel()); + } + } +} diff --git a/Tests/Microsoft.AppCenter.Test.Windows/Microsoft.AppCenter.Test.Windows.csproj b/Tests/Microsoft.AppCenter.Test.Windows/Microsoft.AppCenter.Test.Windows.csproj index dc519e5b2..7129103e5 100644 --- a/Tests/Microsoft.AppCenter.Test.Windows/Microsoft.AppCenter.Test.Windows.csproj +++ b/Tests/Microsoft.AppCenter.Test.Windows/Microsoft.AppCenter.Test.Windows.csproj @@ -104,12 +104,11 @@ - + - - + @@ -120,7 +119,6 @@ - diff --git a/Tests/Microsoft.AppCenter.Test.Windows/MockIngestion.cs b/Tests/Microsoft.AppCenter.Test.Windows/MockIngestion.cs deleted file mode 100644 index 459a071ca..000000000 --- a/Tests/Microsoft.AppCenter.Test.Windows/MockIngestion.cs +++ /dev/null @@ -1,63 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Threading.Tasks; -using Microsoft.AppCenter.Ingestion; -using Microsoft.AppCenter.Ingestion.Http; -using Microsoft.AppCenter.Ingestion.Models; - -namespace Microsoft.AppCenter.Test -{ - public sealed class MockIngestion : IIngestion - { - - public bool CallShouldSucceed { get; set; } - public bool CloseShouldSucceed { get; set; } - public bool IsClosed { get; set; } - public Exception TaskError = new IngestionException(); - - public MockIngestion() - { - CallShouldSucceed = CloseShouldSucceed = true; - IsClosed = false; - } - - public IServiceCall PrepareServiceCall(string appSecret, Guid installId, IList logs) - { - return new MockServiceCall(this, logs, appSecret, installId); - } - - public Task ExecuteCallAsync(IServiceCall call) - { - return CallShouldSucceed ? TaskExtension.GetCompletedTask() : TaskExtension.GetFaultedTask(TaskError); - } - - public void Close() - { - if (!CloseShouldSucceed) - { - throw new IngestionException(); - } - IsClosed = true; - } - - public void Open() - { - IsClosed = false; - } - - public void SetLogUrl(string logUrl) - { - } - - public void Dispose() - { - } - } - - public class MockServiceCall : ServiceCall - { - public MockServiceCall(IIngestion ingestion, IList logs, string appSecret, Guid installId) : base(ingestion, logs, appSecret, installId) - { - } - } -} diff --git a/Tests/Microsoft.AppCenter.Test.Windows/TaskExtension.cs b/Tests/Microsoft.AppCenter.Test.Windows/TaskExtension.cs index 836e013eb..09be36a64 100644 --- a/Tests/Microsoft.AppCenter.Test.Windows/TaskExtension.cs +++ b/Tests/Microsoft.AppCenter.Test.Windows/TaskExtension.cs @@ -59,9 +59,9 @@ public static Task GetCompletedTask(T retVal) return completedTask; } - public static Task GetFaultedTask(T retVal) + public static Task GetFaultedTask(Exception exception) { - var task = Task.Factory.StartNew(() => { throw new IngestionException(); }); + var task = Task.Factory.StartNew(() => throw exception); try { task.Wait(); @@ -72,5 +72,26 @@ public static Task GetFaultedTask(T retVal) } return task; } + + public static Task ToTask(this IServiceCall @this) + { + var source = new TaskCompletionSource(); + @this.ContinueWith(serviceCall => + { + if (serviceCall.IsCanceled) + { + source.SetCanceled(); + } + else if (serviceCall.IsFaulted) + { + source.SetException(serviceCall.Exception); + } + else + { + source.SetResult(serviceCall.Result); + } + }); + return source.Task; + } } } From 43c661d0358825a1eb1543f44445d826be8cbaf7 Mon Sep 17 00:00:00 2001 From: Ivan Matkov Date: Wed, 11 Apr 2018 23:10:51 +0300 Subject: [PATCH 31/46] Fix channel issues --- .../Channel/Channel.cs | 212 +++++++----- .../Channel/ChannelTest.cs | 306 ++++++++++-------- .../Storage/MockStorage.cs | 5 +- .../TaskExtension.cs | 40 +-- 4 files changed, 311 insertions(+), 252 deletions(-) diff --git a/SDK/AppCenter/Microsoft.AppCenter.Windows.Shared/Channel/Channel.cs b/SDK/AppCenter/Microsoft.AppCenter.Windows.Shared/Channel/Channel.cs index 45a2f5d6b..87b62af85 100644 --- a/SDK/AppCenter/Microsoft.AppCenter.Windows.Shared/Channel/Channel.cs +++ b/SDK/AppCenter/Microsoft.AppCenter.Windows.Shared/Channel/Channel.cs @@ -21,7 +21,8 @@ public sealed class Channel : IChannelUnit private readonly IStorage _storage; private readonly IIngestion _ingestion; private readonly IDeviceInformationHelper _deviceInfoHelper = new DeviceInformationHelper(); - private readonly Dictionary> _sendingBatches = new Dictionary>(); + private readonly IDictionary> _sendingBatches = new Dictionary>(); + private readonly ISet _calls = new HashSet(); private readonly int _maxParallelBatches; private readonly int _maxLogsPerBatch; private long _pendingLogCount; @@ -100,8 +101,8 @@ public bool IsEnabled /// Invoked when a log failed to send properly. /// public event EventHandler FailedToSendLog; - #endregion + #endregion /// /// Enable or disable this channel unit. @@ -147,12 +148,16 @@ public async Task EnqueueAsync(Log log) if (discardLogs) { AppCenterLog.Warn(AppCenterLog.LogTag, "Channel is disabled; logs are discarded"); + AppCenterLog.Verbose(AppCenterLog.LogTag, $"Invoke SendingLog event for channel '{Name}'"); SendingLog?.Invoke(this, new SendingLogEventArgs(log)); + AppCenterLog.Verbose(AppCenterLog.LogTag, $"Invoke FailedToSendLog event for channel '{Name}'"); FailedToSendLog?.Invoke(this, new FailedToSendLogEventArgs(log, new CancellationException())); return; } + AppCenterLog.Verbose(AppCenterLog.LogTag, $"Invoke EnqueuingLog event for channel '{Name}'"); EnqueuingLog?.Invoke(this, new EnqueuingLogEventArgs(log)); await PrepareLogAsync(log, state).ConfigureAwait(false); + AppCenterLog.Verbose(AppCenterLog.LogTag, $"Invoke FilteringLog event for channel '{Name}'"); var filteringLogEventArgs = new FilteringLogEventArgs(log); FilteringLog?.Invoke(this, filteringLogEventArgs); if (filteringLogEventArgs.FilterRequested) @@ -250,6 +255,7 @@ public async Task ClearAsync() private void Resume(State state) { + AppCenterLog.Verbose(AppCenterLog.LogTag, $"Resume channel: '{Name}'"); try { using (_mutex.GetLock(state)) @@ -261,15 +267,17 @@ private void Resume(State state) } catch (StatefulMutexException) { - AppCenterLog.Warn(AppCenterLog.LogTag, "The Resume operation has been cancelled"); + AppCenterLog.Warn(AppCenterLog.LogTag, "The resume operation has been cancelled"); } CheckPendingLogs(state); } private void Suspend(State state, bool deleteLogs, Exception exception) { + AppCenterLog.Verbose(AppCenterLog.LogTag, $"Suspend channel: '{Name}'"); try { + List sendingBatches = null; List unsentLogs = null; using (_mutex.GetLock(state)) { @@ -278,6 +286,7 @@ private void Suspend(State state, bool deleteLogs, Exception exception) _discardLogs = deleteLogs; if (deleteLogs) { + sendingBatches = _sendingBatches.Keys.ToList(); unsentLogs = _sendingBatches.Values.SelectMany(batch => batch).ToList(); _sendingBatches.Clear(); } @@ -287,65 +296,69 @@ private void Suspend(State state, bool deleteLogs, Exception exception) { foreach (var log in unsentLogs) { + AppCenterLog.Verbose(AppCenterLog.LogTag, $"Invoke FailedToSendLog event for channel '{Name}'"); FailedToSendLog?.Invoke(this, new FailedToSendLogEventArgs(log, exception)); } } if (deleteLogs) { - try - { - _ingestion.Close(); - } - catch (IngestionException e) - { - AppCenterLog.Error(AppCenterLog.LogTag, "Failed to close ingestion", e); - } + List calls; using (_mutex.GetLock(state)) { + calls = _calls.ToList(); + _calls.Clear(); _pendingLogCount = 0; - TriggerDeleteLogsOnSuspending(); + TriggerDeleteLogsOnSuspending(sendingBatches); + } + foreach (var call in calls) + { + call.Cancel(); } } _storage.ClearPendingLogState(Name); } catch (StatefulMutexException) { - AppCenterLog.Warn(AppCenterLog.LogTag, "The Suspend operation has been cancelled"); + AppCenterLog.Warn(AppCenterLog.LogTag, "The suspend operation has been cancelled"); } } - private void TriggerDeleteLogsOnSuspending() + private void TriggerDeleteLogsOnSuspending(IList sendingBatches) { if (SendingLog == null && FailedToSendLog == null) { _storage.DeleteLogs(Name); return; } - SignalDeletingLogs().ContinueWith(completedTask => _storage.DeleteLogs(Name)); + SignalDeletingLogs(sendingBatches).ContinueWith(completedTask => _storage.DeleteLogs(Name)); } - private Task SignalDeletingLogs() + private async Task SignalDeletingLogs(IList sendingBatches) { var logs = new List(); - return _storage.GetLogsAsync(Name, ClearBatchSize, logs) - .ContinueWith(completedTask => + try + { + do { - if (completedTask.IsFaulted) + var batchId = await _storage.GetLogsAsync(Name, ClearBatchSize, logs).ConfigureAwait(false); + if (sendingBatches.Contains(batchId)) { - AppCenterLog.Warn(AppCenterLog.LogTag, - "Failed to invoke events for logs being deleted."); - return; + continue; } foreach (var log in logs) { + AppCenterLog.Verbose(AppCenterLog.LogTag, $"Invoke SendingLog for channel '{Name}'"); SendingLog?.Invoke(this, new SendingLogEventArgs(log)); + AppCenterLog.Verbose(AppCenterLog.LogTag, $"Invoke FailedToSendLog event for channel '{Name}'"); FailedToSendLog?.Invoke(this, new FailedToSendLogEventArgs(log, new CancellationException())); } - if (logs.Count >= ClearBatchSize) - { - SignalDeletingLogs(); - } - }); + } + while (logs.Count >= ClearBatchSize); + } + catch + { + AppCenterLog.Warn(AppCenterLog.LogTag, "Failed to invoke events for logs being deleted."); + } } private async Task TriggerIngestionAsync(State state) @@ -357,12 +370,12 @@ private async Task TriggerIngestionAsync(State state) return; } AppCenterLog.Debug(AppCenterLog.LogTag, - $"triggerIngestion({Name}) pendingLogCount={_pendingLogCount}"); + $"TriggerIngestion({Name}) pending log count: {_pendingLogCount}"); _batchScheduled = false; if (_sendingBatches.Count >= _maxParallelBatches) { AppCenterLog.Debug(AppCenterLog.LogTag, - "Already sending " + _maxParallelBatches + " batches of analytics data to the server"); + $"Already sending {_maxParallelBatches} batches of analytics data to the server"); return; } } @@ -379,7 +392,24 @@ private async Task TriggerIngestionAsync(State state) } try { - TriggerIngestion(state, logs, batchId); + // Before sending logs, trigger the sending event for this channel + if (SendingLog != null) + { + foreach (var log in logs) + { + AppCenterLog.Verbose(AppCenterLog.LogTag, $"Invoke SendingLog event for channel '{Name}'"); + SendingLog?.Invoke(this, new SendingLogEventArgs(log)); + } + } + + // If the optional Install ID has no value, default to using empty GUID + var installId = await AppCenter.GetInstallIdAsync().ConfigureAwait(false) ?? Guid.Empty; + var ingestionCall = _ingestion.Call(_appSecret, installId, logs); + using (await _mutex.GetLockAsync(state).ConfigureAwait(false)) + { + _calls.Add(ingestionCall); + } + ingestionCall.ContinueWith(call => HandleSendingResult(state, batchId, call)); CheckPendingLogs(state); } catch (StorageException) @@ -389,40 +419,65 @@ private async Task TriggerIngestionAsync(State state) } } - private void TriggerIngestion(State state, IList logs, string batchId) + private void HandleSendingResult(State state, string batchId, IServiceCall call) { - // Before sending logs, trigger the sending event for this channel - if (SendingLog != null) + // Get a lock without checking the state here. + using (_mutex.GetLock()) { - foreach (var eventArgs in logs.Select(log => new SendingLogEventArgs(log))) - { - SendingLog?.Invoke(this, eventArgs); - } + _calls.Remove(call); } - - // If the optional Install ID has no value, default to using empty GUID - // TODO When InstallId will really be async, we should not use Result anymore - var rawInstallId = AppCenter.GetInstallIdAsync().Result; - var installId = rawInstallId.HasValue ? rawInstallId.Value : Guid.Empty; - _ingestion.Call(_appSecret, installId, logs).ContinueWith(call => + try { - var ingestionException = call.Exception; - if (ingestionException == null) + if (call.IsCanceled) { - HandleSendingSuccess(state, batchId); + AppCenterLog.Debug(AppCenterLog.LogTag, $"Sending logs for channel '{Name}', batch '{batchId}' canceled"); + HandleSendingFailure(state, batchId, new CancellationException()); + } + else if (call.IsFaulted) + { + AppCenterLog.Error(AppCenterLog.LogTag, $"Sending logs for channel '{Name}', batch '{batchId}' failed: {call.Exception?.Message}"); + var isRecoverable = call.Exception is IngestionException ingestionException && ingestionException.IsRecoverable; + if (isRecoverable) + { + using (_mutex.GetLock(state)) + { + var removedLogs = _sendingBatches[batchId]; + _sendingBatches.Remove(batchId); + _pendingLogCount += removedLogs.Count; + } + } + else + { + HandleSendingFailure(state, batchId, call.Exception); + } + Suspend(state, !isRecoverable, call.Exception); } else { - HandleSendingFailure(state, batchId, ingestionException); + HandleSendingSuccess(state, batchId); } - }); + } + catch (StatefulMutexException) + { + AppCenterLog.Debug(AppCenterLog.LogTag, "Handle sending operation has been canceled. Callbacks were invoked when channel suspended."); + } } private void HandleSendingSuccess(State state, string batchId) { - if (!_mutex.IsCurrent(state)) + List removedLogs; + using (_mutex.GetLock(state)) { - return; + removedLogs = _sendingBatches[batchId]; + _sendingBatches.Remove(batchId); + } + if (SentLog != null) + { + foreach (var log in removedLogs) + { + AppCenterLog.Verbose(AppCenterLog.LogTag, $"Invoke SentLog event for channel '{Name}'"); + SentLog?.Invoke(this, new SentLogEventArgs(log)); + } } try { @@ -432,52 +487,31 @@ private void HandleSendingSuccess(State state, string batchId) { AppCenterLog.Warn(AppCenterLog.LogTag, $"Could not delete logs for batch {batchId}", e); } - finally - { - List removedLogs; - using (_mutex.GetLock(state)) - { - removedLogs = _sendingBatches[batchId]; - _sendingBatches.Remove(batchId); - } - if (SentLog != null) - { - foreach (var log in removedLogs) - { - SentLog?.Invoke(this, new SentLogEventArgs(log)); - } - } - } } - private void HandleSendingFailure(State state, string batchId, Exception e) + private void HandleSendingFailure(State state, string batchId, Exception exception) { - AppCenterLog.Error(AppCenterLog.LogTag, $"Sending logs for channel '{Name}', batch '{batchId}' failed: {e?.Message}"); - try + List removedLogs; + using (_mutex.GetLock(state)) { - var isRecoverable = e is IngestionException ingestionException && ingestionException.IsRecoverable; - List removedLogs; - using (_mutex.GetLock(state)) + removedLogs = _sendingBatches[batchId]; + _sendingBatches.Remove(batchId); + } + if (FailedToSendLog != null) + { + foreach (var log in removedLogs) { - removedLogs = _sendingBatches[batchId]; - _sendingBatches.Remove(batchId); - if (isRecoverable) - { - _pendingLogCount += removedLogs.Count; - } + AppCenterLog.Verbose(AppCenterLog.LogTag, $"Invoke FailedToSendLog event for channel '{Name}'"); + FailedToSendLog?.Invoke(this, new FailedToSendLogEventArgs(log, exception)); } - if (!isRecoverable && FailedToSendLog != null) - { - foreach (var log in removedLogs) - { - FailedToSendLog?.Invoke(this, new FailedToSendLogEventArgs(log, e)); - } - } - Suspend(state, !isRecoverable, e); } - catch (StatefulMutexException) + try { - AppCenterLog.Debug(AppCenterLog.LogTag, "Handle sending failure operation has been canceled. Callbacks were invoked when channel suspended."); + _storage.DeleteLogs(Name, batchId); + } + catch (StorageException e) + { + AppCenterLog.Warn(AppCenterLog.LogTag, $"Could not delete logs for batch {batchId}", e); } } @@ -518,7 +552,7 @@ private void CheckPendingLogs(State state) } /// - /// Stop sending logs. + /// Stop all calls in progress and deactivate this channel. /// /// The Task to represent this async operation. public Task ShutdownAsync() diff --git a/Tests/Microsoft.AppCenter.Test.Windows/Channel/ChannelTest.cs b/Tests/Microsoft.AppCenter.Test.Windows/Channel/ChannelTest.cs index 0a6d8d03d..70ca65a29 100644 --- a/Tests/Microsoft.AppCenter.Test.Windows/Channel/ChannelTest.cs +++ b/Tests/Microsoft.AppCenter.Test.Windows/Channel/ChannelTest.cs @@ -13,22 +13,19 @@ namespace Microsoft.AppCenter.Test.Channel { + using Channel = Microsoft.AppCenter.Channel.Channel; + [TestClass] public class ChannelTest { private AggregateException _unobservedTaskException; private Mock _mockIngestion; - private Microsoft.AppCenter.Channel.Channel _channel; + private Channel _channel; private IStorage _storage; - private const string ChannelName = "channelName"; + private const string ChannelName = "test"; private const int MaxLogsPerBatch = 3; - private readonly TimeSpan _batchTimeSpan = TimeSpan.FromSeconds(1); private const int MaxParallelBatches = 3; - private readonly string _appSecret = Guid.NewGuid().ToString(); - - // We wait tasks now and don't need wait more - private const int DefaultWaitTime = 500; // Event semaphores for invokation verification private const int SendingLogSemaphoreIdx = 0; @@ -36,9 +33,7 @@ public class ChannelTest private const int FailedToSendLogSemaphoreIdx = 2; private const int EnqueuingLogSemaphoreIdx = 3; private const int FilteringLogSemaphoreIdx = 4; - private readonly List _eventSemaphores = new List { new SemaphoreSlim(0), new SemaphoreSlim(0), new SemaphoreSlim(0), new SemaphoreSlim(0), new SemaphoreSlim(0) }; - - public TestContext TestContext { get;set;} + private List _eventSemaphores; public ChannelTest() { @@ -50,8 +45,8 @@ public void InitializeChannelTest() { _unobservedTaskException = null; _mockIngestion = new Mock(); - MakeIngestionCallsSucceed(); - SetChannelWithTimeSpan(_batchTimeSpan); + SetupIngestionCallSucceed(); + SetChannelWithTimeSpan(TimeSpan.FromSeconds(1)); TaskScheduler.UnobservedTaskException += OnUnobservedTaskException; AppCenterLog.Level = LogLevel.Verbose; @@ -114,7 +109,7 @@ public void EnableChannel() /// Verify that enqueuing a log passes the same log reference to enqueue event argument /// [TestMethod] - public void EnqueuedLogsAreSame() + public async Task EnqueuedLogsAreSame() { var log = new TestLog(); var sem = new SemaphoreSlim(0); @@ -124,113 +119,109 @@ public void EnqueuedLogsAreSame() sem.Release(); }; - _channel.EnqueueAsync(log).RunNotAsync(); - Assert.IsTrue(sem.Wait(DefaultWaitTime)); + await _channel.EnqueueAsync(log); + Assert.IsTrue(sem.Wait(0)); } /// /// Verify that when a batch reaches its capacity, it is sent immediately /// [TestMethod] - public void EnqueueMaxLogs() + public async Task EnqueueMaxLogs() { SetChannelWithTimeSpan(TimeSpan.FromHours(1)); for (var i = 0; i < MaxLogsPerBatch; ++i) { - _channel.EnqueueAsync(new TestLog()).RunNotAsync(); + await _channel.EnqueueAsync(new TestLog()); } - Assert.IsTrue(SendingLogOccurred(1)); + VerifySendingLog(MaxLogsPerBatch); } /// /// Verify that when channel is disabled, sent event is not triggered /// [TestMethod] - public void EnqueueWhileDisabled() + public async Task EnqueueWhileDisabled() { _channel.SetEnabled(false); var log = new TestLog(); - _channel.EnqueueAsync(log).RunNotAsync(); - Assert.IsTrue(FailedToSendLogOccurred(1)); - Assert.IsFalse(EnqueuingLogOccurred(1)); + await _channel.EnqueueAsync(log); + VerifyFailedToSendLog(1); + VerifyEnqueuingLog(0); } [TestMethod] - public void ChannelInvokesFilteringLogEvent() + public async Task ChannelInvokesFilteringLogEvent() { for (var i = 0; i < MaxLogsPerBatch; ++i) { - _channel.EnqueueAsync(new TestLog()).RunNotAsync(); + await _channel.EnqueueAsync(new TestLog()); } - - Assert.IsTrue(FilteringLogOccurred(MaxLogsPerBatch)); + VerifyFilteringLog(MaxLogsPerBatch); } /// /// Validate filtering out a log /// [TestMethod] - public void FilterLogShouldNotSend() + public async Task FilterLogShouldNotSend() { _channel.FilteringLog += (sender, args) => args.FilterRequested = true; for (int i = 0; i < MaxLogsPerBatch; ++i) { - _channel.EnqueueAsync(new TestLog()).RunNotAsync(); + await _channel.EnqueueAsync(new TestLog()); } - Assert.IsTrue(FilteringLogOccurred(MaxLogsPerBatch)); - Assert.IsFalse(SendingLogOccurred(MaxLogsPerBatch)); - Assert.IsFalse(SentLogOccurred(MaxLogsPerBatch)); + VerifyFilteringLog(MaxLogsPerBatch); + VerifySendingLog(0); + VerifySentLog(0); } /// /// Validate filters can cancel each other /// [TestMethod] - public void FilterLogThenCancelFilterLogInAnotherHandlerShouldSend() + public async Task FilterLogThenCancelFilterLogInAnotherHandlerShouldSend() { _channel.FilteringLog += (sender, args) => args.FilterRequested = true; _channel.FilteringLog += (sender, args) => args.FilterRequested = false; for (int i = 0; i < MaxLogsPerBatch; ++i) { - _channel.EnqueueAsync(new TestLog()).RunNotAsync(); + await _channel.EnqueueAsync(new TestLog()); } - Assert.IsTrue(FilteringLogOccurred(MaxLogsPerBatch)); - Assert.IsTrue(SendingLogOccurred(MaxLogsPerBatch)); - Assert.IsTrue(SentLogOccurred(MaxLogsPerBatch)); + VerifyFilteringLog(MaxLogsPerBatch); + VerifySendingLog(MaxLogsPerBatch); + VerifySentLog(MaxLogsPerBatch); } [TestMethod] - public void ChannelInvokesSendingLogEvent() + public async Task ChannelInvokesSendingLogEvent() { for (var i = 0; i < MaxLogsPerBatch; ++i) { - _channel.EnqueueAsync(new TestLog()).RunNotAsync(); + await _channel.EnqueueAsync(new TestLog()); } - - Assert.IsTrue(SendingLogOccurred(MaxLogsPerBatch)); + VerifySendingLog(MaxLogsPerBatch); } [TestMethod] - public void ChannelInvokesSentLogEvent() + public async Task ChannelInvokesSentLogEvent() { for (var i = 0; i < MaxLogsPerBatch; ++i) { - _channel.EnqueueAsync(new TestLog()).RunNotAsync(); + await _channel.EnqueueAsync(new TestLog()); } - - Assert.IsTrue(SentLogOccurred(MaxLogsPerBatch)); + VerifySentLog(MaxLogsPerBatch); } [TestMethod] - public void ChannelInvokesFailedToSendLogEvent() + public async Task ChannelInvokesFailedToSendLogEvent() { - MakeIngestionCallsFail(new Exception()); + SetupIngestionCallFail(new Exception()); for (var i = 0; i < MaxLogsPerBatch; ++i) { - _channel.EnqueueAsync(new TestLog()).RunNotAsync(); + await _channel.EnqueueAsync(new TestLog()); } - - Assert.IsTrue(FailedToSendLogOccurred(MaxLogsPerBatch)); + VerifyFailedToSendLog(MaxLogsPerBatch); } /// @@ -250,48 +241,46 @@ public void FailedToSendLogEventArgsAreSame() /// Validate that channel will send log after enabling /// [TestMethod] - public void ChannelInvokesSendingLogEventAfterEnabling() + public async Task ChannelInvokesSendingLogEventAfterEnabling() { - _channel.ShutdownAsync().RunNotAsync(); + await _channel.ShutdownAsync(); for (int i = 0; i < MaxLogsPerBatch; ++i) { - _channel.EnqueueAsync(new TestLog()).RunNotAsync(); + await _channel.EnqueueAsync(new TestLog()); } - _channel.SetEnabled(true); - - Assert.IsTrue(SendingLogOccurred(MaxLogsPerBatch)); + VerifySendingLog(MaxLogsPerBatch); } /// /// Validate that FailedToSendLog calls when channel is disabled /// [TestMethod] - public void ChannelInvokesFailedToSendLogEventAfterDisabling() + public async Task ChannelInvokesFailedToSendLogEventAfterDisabling() { _channel.SetEnabled(false); for (int i = 0; i < MaxLogsPerBatch; ++i) { - _channel.EnqueueAsync(new TestLog()).RunNotAsync(); + await _channel.EnqueueAsync(new TestLog()); } - Assert.IsTrue(SendingLogOccurred(MaxLogsPerBatch)); - Assert.IsTrue(FailedToSendLogOccurred(MaxLogsPerBatch)); + VerifySendingLog(MaxLogsPerBatch); + VerifyFailedToSendLog(MaxLogsPerBatch); } /// /// Validate that all logs removed /// [TestMethod] - public void ClearLogs() + public async Task TaskClearLogs() { - _channel.ShutdownAsync().RunNotAsync(); - _channel.EnqueueAsync(new TestLog()).RunNotAsync(); + await _channel.ShutdownAsync(); + await _channel.EnqueueAsync(new TestLog()); - _channel.ClearAsync().RunNotAsync(); + await _channel.ClearAsync(); _channel.SetEnabled(true); - Assert.IsFalse(SendingLogOccurred(1)); + VerifySendingLog(0); } /// @@ -309,7 +298,7 @@ public void DisposeChannelTest() /// Validate that StorageException is processing without exception /// [TestMethod] - public void ThrowStorageExceptionInDeleteLogsTime() + public async Task ThrowStorageExceptionInDeleteLogsTime() { var log = new TestLog(); var storageException = new StorageException(); @@ -330,64 +319,125 @@ public void ThrowStorageExceptionInDeleteLogsTime() .Callback((string channelName, int limit, List logs) => logs.Add(log)) .Returns(() => Task.FromResult("test-batch-id")); - _channel = new Microsoft.AppCenter.Channel.Channel(ChannelName, 1, _batchTimeSpan, 1, _appSecret, _mockIngestion.Object, storage.Object); + var appSecret = Guid.NewGuid().ToString(); + _channel = new Channel(ChannelName, 1, TimeSpan.FromSeconds(1), 1, appSecret, _mockIngestion.Object, storage.Object); SetupEventCallbacks(); // Shutdown channel and store some log - _channel.ShutdownAsync().RunNotAsync(); - _channel.EnqueueAsync(log).RunNotAsync(); + await _channel.ShutdownAsync(); + await _channel.EnqueueAsync(log); _channel.SetEnabled(true); - Assert.IsTrue(SentLogOccurred(1)); + VerifySentLog(1); // Not throw any exception } + [TestMethod] + public async Task MultiBatchTest() + { + SetChannelWithTimeSpan(TimeSpan.Zero); + + var calls = new[] { new ServiceCall(), new ServiceCall(), new ServiceCall() }; + var setup = _mockIngestion + .SetupSequence(ingestion => ingestion.Call( + It.IsAny(), + It.IsAny(), + It.IsAny>())); + foreach (var call in calls) + { + setup.Returns(call); + } + + // Send in separate batches + await _channel.EnqueueAsync(new TestLog()); + VerifySendingLog(1); + await _channel.EnqueueAsync(new TestLog()); + VerifySendingLog(1); + await _channel.EnqueueAsync(new TestLog()); + VerifySendingLog(1); + + // Complete all + foreach (var call in calls) + { + call.SetResult("test"); + } + VerifySentLog(3); + } + /// - /// Verify that when a recoverable http error occurs, ingestion stays open + /// Verify recoverable http error /// [TestMethod] - public void IngestionNotClosedOnRecoverableHttpError() + public async Task RecoverableHttpError() { - MakeIngestionCallsFail(new RecoverableIngestionException()); - _channel.EnqueueAsync(new TestLog()).RunNotAsync(); + SetChannelWithTimeSpan(TimeSpan.Zero); + + // Enqueue some log and and do not complete it + var call = new ServiceCall(); + _mockIngestion + .Setup(ingestion => ingestion.Call( + It.IsAny(), + It.IsAny(), + It.IsAny>())) + .Returns((string appSecret, Guid installId, IList logs) => call); + await _channel.EnqueueAsync(new TestLog()); + VerifySendingLog(1); + + // Next one will fail + SetupIngestionCallFail(new RecoverableIngestionException()); + await _channel.EnqueueAsync(new TestLog()); + VerifySendingLog(1); - // wait for SendingLog event - _eventSemaphores[SendingLogSemaphoreIdx].Wait(); - // wait up to 20 seconds for suspend to finish - bool disabled = WaitForChannelDisable(TimeSpan.FromSeconds(20)); - Assert.IsTrue(disabled); + // Wait up to 20 seconds for suspend to finish + VerifyChannelDisable(TimeSpan.FromSeconds(10)); _mockIngestion.Verify(ingestion => ingestion.Close(), Times.Never); + VerifyFailedToSendLog(0); + Assert.IsFalse(call.IsCompleted); + Assert.IsFalse(call.IsCanceled); } /// - /// Verify that if a non-recoverable http error occurs, ingestion is closed + /// Verify non-recoverable http error /// [TestMethod] - public void IngestionClosedOnNonRecoverableHttpError() + public async Task NonRecoverableHttpError() { - MakeIngestionCallsFail(new NonRecoverableIngestionException()); - _channel.EnqueueAsync(new TestLog()).RunNotAsync(); + SetChannelWithTimeSpan(TimeSpan.Zero); - // wait up to 20 seconds for suspend to finish - bool disabled = WaitForChannelDisable(TimeSpan.FromSeconds(20)); - Assert.IsTrue(disabled); + // Enqueue some log and and do not complete it + var call = new ServiceCall(); + _mockIngestion + .Setup(ingestion => ingestion.Call( + It.IsAny(), + It.IsAny(), + It.IsAny>())) + .Returns((string appSecret, Guid installId, IList logs) => call); + await _channel.EnqueueAsync(new TestLog()); + VerifySendingLog(1); - _mockIngestion.Verify(ingestion => ingestion.Close(), Times.Once); - Assert.IsFalse(_channel.IsEnabled); + // Next one will fail + SetupIngestionCallFail(new NonRecoverableIngestionException()); + await _channel.EnqueueAsync(new TestLog()); + VerifySendingLog(1); + + // Wait up to 20 seconds for suspend to finish + VerifyChannelDisable(TimeSpan.FromSeconds(10)); + _mockIngestion.Verify(ingestion => ingestion.Close(), Times.Never); + VerifyFailedToSendLog(2); + + // The first call is canceled + await Assert.ThrowsExceptionAsync(() => call.ToTask()); } private void SetChannelWithTimeSpan(TimeSpan timeSpan) { - if (TestContext.TestName != "ThrowStorageExceptionInDeleteLogsTime") - { - _storage = new MockStorage(); - _channel = new Microsoft.AppCenter.Channel.Channel(ChannelName, MaxLogsPerBatch, timeSpan, MaxParallelBatches, - _appSecret, _mockIngestion.Object, _storage); - SetupEventCallbacks(); - } - MakeIngestionCallsSucceed(); + _storage = new MockStorage(); + var appSecret = Guid.NewGuid().ToString(); + _channel = new Channel(ChannelName, MaxLogsPerBatch, timeSpan, MaxParallelBatches, + appSecret, _mockIngestion.Object, _storage); + SetupEventCallbacks(); } private void EnsureAllTasksAreFinishedInChannel() @@ -401,7 +451,7 @@ private void EnsureAllTasksAreFinishedInChannel() catch (ObjectDisposedException) { } } - private void MakeIngestionCallsFail(Exception exception) + private void SetupIngestionCallFail(Exception exception) { _mockIngestion .Setup(ingestion => ingestion.Call( @@ -416,7 +466,7 @@ private void MakeIngestionCallsFail(Exception exception) }); } - private void MakeIngestionCallsSucceed() + private void SetupIngestionCallSucceed(string result = "") { _mockIngestion .Setup(ingestion => ingestion.Call( @@ -426,20 +476,17 @@ private void MakeIngestionCallsSucceed() .Returns((string appSecret, Guid installId, IList logs) => { var call = new ServiceCall(appSecret, installId, logs); - call.SetResult(""); + call.SetResult(result); return call; }); } private void SetupEventCallbacks() { - foreach (var sem in _eventSemaphores) + _eventSemaphores = new List { - if (sem.CurrentCount != 0) - { - sem.Release(sem.CurrentCount); - } - } + new SemaphoreSlim(0), new SemaphoreSlim(0), new SemaphoreSlim(0), new SemaphoreSlim(0), new SemaphoreSlim(0) + }; _channel.SendingLog += (sender, args) => { _eventSemaphores[SendingLogSemaphoreIdx].Release(); }; _channel.SentLog += (sender, args) => { _eventSemaphores[SentLogSemaphoreIdx].Release(); }; _channel.FailedToSendLog += (sender, args) => { _eventSemaphores[FailedToSendLogSemaphoreIdx].Release(); }; @@ -447,54 +494,47 @@ private void SetupEventCallbacks() _channel.FilteringLog += (sender, args) => { _eventSemaphores[FilteringLogSemaphoreIdx].Release(); }; } - private bool FailedToSendLogOccurred(int numTimes, int waitTime = DefaultWaitTime) - { - return EventWithSemaphoreOccurred(_eventSemaphores[FailedToSendLogSemaphoreIdx], numTimes, waitTime); - } + private void VerifySendingLog(int expectedTimes) => + Assert.AreEqual(expectedTimes, EventWithSemaphoreOccurred(_eventSemaphores[SendingLogSemaphoreIdx]), + $"Failed on verify {nameof(Channel.SendingLog)} event call times"); - private bool EnqueuingLogOccurred(int numTimes, int waitTime = DefaultWaitTime) - { - return EventWithSemaphoreOccurred(_eventSemaphores[EnqueuingLogSemaphoreIdx], numTimes, waitTime); - } + private void VerifySentLog(int expectedTimes) => + Assert.AreEqual(expectedTimes, EventWithSemaphoreOccurred(_eventSemaphores[SentLogSemaphoreIdx]), + $"Failed on verify {nameof(Channel.SentLog)} event call times"); - private bool FilteringLogOccurred(int numTimes, int waitTime = DefaultWaitTime) - { - return EventWithSemaphoreOccurred(_eventSemaphores[FilteringLogSemaphoreIdx], numTimes, waitTime); - } + private void VerifyFailedToSendLog(int expectedTimes) => + Assert.AreEqual(expectedTimes, EventWithSemaphoreOccurred(_eventSemaphores[FailedToSendLogSemaphoreIdx]), + $"Failed on verify {nameof(Channel.FailedToSendLog)} event call times"); - private bool SentLogOccurred(int numTimes, int waitTime = DefaultWaitTime) - { - return EventWithSemaphoreOccurred(_eventSemaphores[SentLogSemaphoreIdx], numTimes, waitTime); - } + private void VerifyEnqueuingLog(int expectedTimes) => + Assert.AreEqual(expectedTimes, EventWithSemaphoreOccurred(_eventSemaphores[EnqueuingLogSemaphoreIdx]), + $"Failed on verify {nameof(Channel.EnqueuingLog)} event call times"); - private bool SendingLogOccurred(int numTimes, int waitTime = DefaultWaitTime) - { - return EventWithSemaphoreOccurred(_eventSemaphores[SendingLogSemaphoreIdx], numTimes, waitTime); - } + private void VerifyFilteringLog(int expectedTimes) => + Assert.AreEqual(expectedTimes, EventWithSemaphoreOccurred(_eventSemaphores[FilteringLogSemaphoreIdx]), + $"Failed on verify {nameof(Channel.FilteringLog)} event call times"); - private bool WaitForChannelDisable(TimeSpan timeout) + private void VerifyChannelDisable(TimeSpan timeout) { var task = Task.Run(async () => { while (_channel.IsEnabled) { - await Task.Delay(100); + await Task.Delay(10); } }); - - return task.Wait(timeout); + Assert.IsTrue(task.Wait(timeout)); } - private static bool EventWithSemaphoreOccurred(SemaphoreSlim semaphore, int numTimes, int waitTime) + private static int EventWithSemaphoreOccurred(SemaphoreSlim semaphore) { - for (var i = 0; i < numTimes; ++i) + for (var i = 0;; ++i) { - if (!semaphore.Wait(waitTime)) + if (!semaphore.Wait(i == 0 ? 1000 : 100)) { - return false; + return i; } } - return true; } } } diff --git a/Tests/Microsoft.AppCenter.Test.Windows/Storage/MockStorage.cs b/Tests/Microsoft.AppCenter.Test.Windows/Storage/MockStorage.cs index f22bcfcca..c20594673 100644 --- a/Tests/Microsoft.AppCenter.Test.Windows/Storage/MockStorage.cs +++ b/Tests/Microsoft.AppCenter.Test.Windows/Storage/MockStorage.cs @@ -63,8 +63,11 @@ public Task GetLogsAsync(string channelName, int limit, List logs) { lock (this) { + var pending = _pending.SelectMany(i => i.Value).ToList(); var batchId = Guid.NewGuid().ToString(); - var batch = this[channelName].Take(limit).ToList(); + var batch = this[channelName] + .Where(log => !pending.Contains(log)) + .Take(limit).ToList(); _pending.Add(batchId, batch); logs?.Clear(); logs?.AddRange(batch); diff --git a/Tests/Microsoft.AppCenter.Test.Windows/TaskExtension.cs b/Tests/Microsoft.AppCenter.Test.Windows/TaskExtension.cs index 09be36a64..df3af1fd6 100644 --- a/Tests/Microsoft.AppCenter.Test.Windows/TaskExtension.cs +++ b/Tests/Microsoft.AppCenter.Test.Windows/TaskExtension.cs @@ -8,55 +8,37 @@ public static class TaskExtension { public static T RunNotAsync(this Task @this) { - try - { - @this.Wait(); - } - catch (AggregateException e) - { - throw e.InnerException; - } - return @this.Result; + return @this.GetAwaiter().GetResult(); } + public static void RunNotAsync(this Task @this) { - try - { - @this.Wait(); - } - catch (AggregateException e) - { - throw e.InnerException; - } + @this.GetAwaiter().GetResult(); } public static Task GetCompletedTask() { - var completedTask = Task.Delay(0); - completedTask.Wait(); - return completedTask; + return Task.FromResult(false); } public static Task GetFaultedTask(Exception e) { - Task task = null; + var task = Task.Factory.StartNew(() => throw e); try { - task = Task.Factory.StartNew(() => { throw e; }); task.Wait(); } - catch (Exception) + catch { - + // ignored } + return task; } public static Task GetCompletedTask(T retVal) { - var completedTask = Task.Factory.StartNew(() => retVal); - completedTask.Wait(); - return completedTask; + return Task.FromResult(retVal); } public static Task GetFaultedTask(Exception exception) @@ -66,9 +48,9 @@ public static Task GetFaultedTask(Exception exception) { task.Wait(); } - catch (Exception) + catch { - + // ignored } return task; } From b4db9d67974ba9e64653f6d57bc0b7e4d001c2e3 Mon Sep 17 00:00:00 2001 From: Ivan Matkov Date: Wed, 11 Apr 2018 23:55:18 +0300 Subject: [PATCH 32/46] Address feedback --- .../Ingestion/Http/IngestionHttp.cs | 2 ++ .../Ingestion/Http/NetworkStateIngestion.cs | 5 +++-- .../Ingestion/Http/RetryableIngestion.cs | 3 ++- .../Ingestion/ServiceCall.cs | 8 ++++++++ .../Channel/ChannelTest.cs | 2 +- 5 files changed, 16 insertions(+), 4 deletions(-) diff --git a/SDK/AppCenter/Microsoft.AppCenter.Windows.Shared/Ingestion/Http/IngestionHttp.cs b/SDK/AppCenter/Microsoft.AppCenter.Windows.Shared/Ingestion/Http/IngestionHttp.cs index c0cbde13a..a18135e14 100644 --- a/SDK/AppCenter/Microsoft.AppCenter.Windows.Shared/Ingestion/Http/IngestionHttp.cs +++ b/SDK/AppCenter/Microsoft.AppCenter.Windows.Shared/Ingestion/Http/IngestionHttp.cs @@ -17,7 +17,9 @@ internal sealed class IngestionHttp : IIngestion internal const string InstallId = "Install-ID"; private const int MaximumCharactersDisplayedForAppSecret = 8; + private string _baseLogUrl; + private readonly IHttpNetworkAdapter _httpNetwork; public IngestionHttp(IHttpNetworkAdapter httpNetwork) diff --git a/SDK/AppCenter/Microsoft.AppCenter.Windows.Shared/Ingestion/Http/NetworkStateIngestion.cs b/SDK/AppCenter/Microsoft.AppCenter.Windows.Shared/Ingestion/Http/NetworkStateIngestion.cs index b914140ac..d750dec65 100644 --- a/SDK/AppCenter/Microsoft.AppCenter.Windows.Shared/Ingestion/Http/NetworkStateIngestion.cs +++ b/SDK/AppCenter/Microsoft.AppCenter.Windows.Shared/Ingestion/Http/NetworkStateIngestion.cs @@ -6,7 +6,8 @@ namespace Microsoft.AppCenter.Ingestion.Http { internal sealed class NetworkStateIngestion : IngestionDecorator { - private readonly HashSet _calls = new HashSet(); + private readonly ISet _calls = new HashSet(); + private readonly INetworkStateAdapter _networkStateAdapter; public NetworkStateIngestion(IIngestion decoratedApi, INetworkStateAdapter networkStateAdapter) @@ -84,7 +85,7 @@ public override void Dispose() private void CancelAllCalls() { - List calls; + IList calls; lock (_calls) { if (_calls.Count == 0) diff --git a/SDK/AppCenter/Microsoft.AppCenter.Windows.Shared/Ingestion/Http/RetryableIngestion.cs b/SDK/AppCenter/Microsoft.AppCenter.Windows.Shared/Ingestion/Http/RetryableIngestion.cs index b83e233af..f3e7292c1 100644 --- a/SDK/AppCenter/Microsoft.AppCenter.Windows.Shared/Ingestion/Http/RetryableIngestion.cs +++ b/SDK/AppCenter/Microsoft.AppCenter.Windows.Shared/Ingestion/Http/RetryableIngestion.cs @@ -16,6 +16,7 @@ internal sealed class RetryableIngestion : IngestionDecorator }; private readonly IDictionary _calls = new Dictionary(); + private readonly TimeSpan[] _retryIntervals; public RetryableIngestion(IIngestion decoratedApi) @@ -129,7 +130,7 @@ public override void Dispose() private void CancelAllCalls() { - List calls; + IList calls; lock (_calls) { if (_calls.Count == 0) diff --git a/SDK/AppCenter/Microsoft.AppCenter.Windows.Shared/Ingestion/ServiceCall.cs b/SDK/AppCenter/Microsoft.AppCenter.Windows.Shared/Ingestion/ServiceCall.cs index b97c49cb3..be1034532 100644 --- a/SDK/AppCenter/Microsoft.AppCenter.Windows.Shared/Ingestion/ServiceCall.cs +++ b/SDK/AppCenter/Microsoft.AppCenter.Windows.Shared/Ingestion/ServiceCall.cs @@ -9,21 +9,29 @@ namespace Microsoft.AppCenter.Ingestion internal class ServiceCall : IServiceCall { private readonly CancellationTokenSource _tokenSource = new CancellationTokenSource(); + private Action _continuationAction; + private readonly object _lock = new object(); + private bool _disposed; public bool IsCanceled => CancellationToken.IsCancellationRequested; + public bool IsCompleted { get; private set; } + public bool IsFaulted => Exception != null; public string Result { get; private set; } + public Exception Exception { get; private set; } public CancellationToken CancellationToken => _tokenSource.Token; public string AppSecret { get; } + public Guid InstallId { get; } + public IList Logs { get; } public ServiceCall() diff --git a/Tests/Microsoft.AppCenter.Test.Windows/Channel/ChannelTest.cs b/Tests/Microsoft.AppCenter.Test.Windows/Channel/ChannelTest.cs index 0a6d8d03d..b3d3e88d3 100644 --- a/Tests/Microsoft.AppCenter.Test.Windows/Channel/ChannelTest.cs +++ b/Tests/Microsoft.AppCenter.Test.Windows/Channel/ChannelTest.cs @@ -373,7 +373,7 @@ public void IngestionClosedOnNonRecoverableHttpError() // wait up to 20 seconds for suspend to finish bool disabled = WaitForChannelDisable(TimeSpan.FromSeconds(20)); Assert.IsTrue(disabled); - + _mockIngestion.Verify(ingestion => ingestion.Close(), Times.Once); Assert.IsFalse(_channel.IsEnabled); } From d739ffb41af555a476af56e6fd84e1f46b81da68 Mon Sep 17 00:00:00 2001 From: Ivan Matkov Date: Thu, 12 Apr 2018 00:03:33 +0300 Subject: [PATCH 33/46] Address feedback --- .../Channel/Channel.cs | 49 ++++++++++++------- .../Channel/ChannelTest.cs | 10 ++++ 2 files changed, 42 insertions(+), 17 deletions(-) diff --git a/SDK/AppCenter/Microsoft.AppCenter.Windows.Shared/Channel/Channel.cs b/SDK/AppCenter/Microsoft.AppCenter.Windows.Shared/Channel/Channel.cs index 87b62af85..317535d01 100644 --- a/SDK/AppCenter/Microsoft.AppCenter.Windows.Shared/Channel/Channel.cs +++ b/SDK/AppCenter/Microsoft.AppCenter.Windows.Shared/Channel/Channel.cs @@ -16,20 +16,35 @@ namespace Microsoft.AppCenter.Channel public sealed class Channel : IChannelUnit { private const int ClearBatchSize = 100; + private Ingestion.Models.Device _device; + private readonly string _appSecret; + private readonly IStorage _storage; + private readonly IIngestion _ingestion; + private readonly IDeviceInformationHelper _deviceInfoHelper = new DeviceInformationHelper(); + private readonly IDictionary> _sendingBatches = new Dictionary>(); + private readonly ISet _calls = new HashSet(); + private readonly int _maxParallelBatches; + private readonly int _maxLogsPerBatch; + private long _pendingLogCount; + private bool _enabled; + private bool _discardLogs; + private bool _batchScheduled; + private TimeSpan _batchTimeInterval; + private readonly StatefulMutex _mutex = new StatefulMutex(); internal Channel(string name, int maxLogsPerBatch, TimeSpan batchTimeInterval, int maxParallelBatches, @@ -148,16 +163,16 @@ public async Task EnqueueAsync(Log log) if (discardLogs) { AppCenterLog.Warn(AppCenterLog.LogTag, "Channel is disabled; logs are discarded"); - AppCenterLog.Verbose(AppCenterLog.LogTag, $"Invoke SendingLog event for channel '{Name}'"); + AppCenterLog.Debug(AppCenterLog.LogTag, $"Invoke SendingLog event for channel '{Name}'"); SendingLog?.Invoke(this, new SendingLogEventArgs(log)); - AppCenterLog.Verbose(AppCenterLog.LogTag, $"Invoke FailedToSendLog event for channel '{Name}'"); + AppCenterLog.Debug(AppCenterLog.LogTag, $"Invoke FailedToSendLog event for channel '{Name}'"); FailedToSendLog?.Invoke(this, new FailedToSendLogEventArgs(log, new CancellationException())); return; } - AppCenterLog.Verbose(AppCenterLog.LogTag, $"Invoke EnqueuingLog event for channel '{Name}'"); + AppCenterLog.Debug(AppCenterLog.LogTag, $"Invoke EnqueuingLog event for channel '{Name}'"); EnqueuingLog?.Invoke(this, new EnqueuingLogEventArgs(log)); await PrepareLogAsync(log, state).ConfigureAwait(false); - AppCenterLog.Verbose(AppCenterLog.LogTag, $"Invoke FilteringLog event for channel '{Name}'"); + AppCenterLog.Debug(AppCenterLog.LogTag, $"Invoke FilteringLog event for channel '{Name}'"); var filteringLogEventArgs = new FilteringLogEventArgs(log); FilteringLog?.Invoke(this, filteringLogEventArgs); if (filteringLogEventArgs.FilterRequested) @@ -255,7 +270,7 @@ public async Task ClearAsync() private void Resume(State state) { - AppCenterLog.Verbose(AppCenterLog.LogTag, $"Resume channel: '{Name}'"); + AppCenterLog.Debug(AppCenterLog.LogTag, $"Resume channel: '{Name}'"); try { using (_mutex.GetLock(state)) @@ -274,11 +289,11 @@ private void Resume(State state) private void Suspend(State state, bool deleteLogs, Exception exception) { - AppCenterLog.Verbose(AppCenterLog.LogTag, $"Suspend channel: '{Name}'"); + AppCenterLog.Debug(AppCenterLog.LogTag, $"Suspend channel: '{Name}'"); try { - List sendingBatches = null; - List unsentLogs = null; + IList sendingBatches = null; + IList unsentLogs = null; using (_mutex.GetLock(state)) { _enabled = false; @@ -296,13 +311,13 @@ private void Suspend(State state, bool deleteLogs, Exception exception) { foreach (var log in unsentLogs) { - AppCenterLog.Verbose(AppCenterLog.LogTag, $"Invoke FailedToSendLog event for channel '{Name}'"); + AppCenterLog.Debug(AppCenterLog.LogTag, $"Invoke FailedToSendLog event for channel '{Name}'"); FailedToSendLog?.Invoke(this, new FailedToSendLogEventArgs(log, exception)); } } if (deleteLogs) { - List calls; + IList calls; using (_mutex.GetLock(state)) { calls = _calls.ToList(); @@ -347,9 +362,9 @@ private async Task SignalDeletingLogs(IList sendingBatches) } foreach (var log in logs) { - AppCenterLog.Verbose(AppCenterLog.LogTag, $"Invoke SendingLog for channel '{Name}'"); + AppCenterLog.Debug(AppCenterLog.LogTag, $"Invoke SendingLog for channel '{Name}'"); SendingLog?.Invoke(this, new SendingLogEventArgs(log)); - AppCenterLog.Verbose(AppCenterLog.LogTag, $"Invoke FailedToSendLog event for channel '{Name}'"); + AppCenterLog.Debug(AppCenterLog.LogTag, $"Invoke FailedToSendLog event for channel '{Name}'"); FailedToSendLog?.Invoke(this, new FailedToSendLogEventArgs(log, new CancellationException())); } } @@ -397,7 +412,7 @@ private async Task TriggerIngestionAsync(State state) { foreach (var log in logs) { - AppCenterLog.Verbose(AppCenterLog.LogTag, $"Invoke SendingLog event for channel '{Name}'"); + AppCenterLog.Debug(AppCenterLog.LogTag, $"Invoke SendingLog event for channel '{Name}'"); SendingLog?.Invoke(this, new SendingLogEventArgs(log)); } } @@ -465,7 +480,7 @@ private void HandleSendingResult(State state, string batchId, IServiceCall call) private void HandleSendingSuccess(State state, string batchId) { - List removedLogs; + IList removedLogs; using (_mutex.GetLock(state)) { removedLogs = _sendingBatches[batchId]; @@ -475,7 +490,7 @@ private void HandleSendingSuccess(State state, string batchId) { foreach (var log in removedLogs) { - AppCenterLog.Verbose(AppCenterLog.LogTag, $"Invoke SentLog event for channel '{Name}'"); + AppCenterLog.Debug(AppCenterLog.LogTag, $"Invoke SentLog event for channel '{Name}'"); SentLog?.Invoke(this, new SentLogEventArgs(log)); } } @@ -491,7 +506,7 @@ private void HandleSendingSuccess(State state, string batchId) private void HandleSendingFailure(State state, string batchId, Exception exception) { - List removedLogs; + IList removedLogs; using (_mutex.GetLock(state)) { removedLogs = _sendingBatches[batchId]; @@ -501,7 +516,7 @@ private void HandleSendingFailure(State state, string batchId, Exception excepti { foreach (var log in removedLogs) { - AppCenterLog.Verbose(AppCenterLog.LogTag, $"Invoke FailedToSendLog event for channel '{Name}'"); + AppCenterLog.Debug(AppCenterLog.LogTag, $"Invoke FailedToSendLog event for channel '{Name}'"); FailedToSendLog?.Invoke(this, new FailedToSendLogEventArgs(log, exception)); } } diff --git a/Tests/Microsoft.AppCenter.Test.Windows/Channel/ChannelTest.cs b/Tests/Microsoft.AppCenter.Test.Windows/Channel/ChannelTest.cs index 70ca65a29..19a485a29 100644 --- a/Tests/Microsoft.AppCenter.Test.Windows/Channel/ChannelTest.cs +++ b/Tests/Microsoft.AppCenter.Test.Windows/Channel/ChannelTest.cs @@ -19,20 +19,30 @@ namespace Microsoft.AppCenter.Test.Channel public class ChannelTest { private AggregateException _unobservedTaskException; + private Mock _mockIngestion; + private Channel _channel; + private IStorage _storage; private const string ChannelName = "test"; + private const int MaxLogsPerBatch = 3; + private const int MaxParallelBatches = 3; // Event semaphores for invokation verification private const int SendingLogSemaphoreIdx = 0; + private const int SentLogSemaphoreIdx = 1; + private const int FailedToSendLogSemaphoreIdx = 2; + private const int EnqueuingLogSemaphoreIdx = 3; + private const int FilteringLogSemaphoreIdx = 4; + private List _eventSemaphores; public ChannelTest() From 17f6c390dfbd5b7a3d23858ab3f710dfa81409f7 Mon Sep 17 00:00:00 2001 From: Guillaume Perrot Date: Wed, 11 Apr 2018 18:56:11 -0700 Subject: [PATCH 34/46] Speed up tests, try to avoid flakiness --- .../SessionTrackerTest.cs | 30 +++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/Tests/Microsoft.AppCenter.Analytics.Test.Windows/SessionTrackerTest.cs b/Tests/Microsoft.AppCenter.Analytics.Test.Windows/SessionTrackerTest.cs index 9091b988a..868d64234 100644 --- a/Tests/Microsoft.AppCenter.Analytics.Test.Windows/SessionTrackerTest.cs +++ b/Tests/Microsoft.AppCenter.Analytics.Test.Windows/SessionTrackerTest.cs @@ -26,7 +26,7 @@ public void InitializeSessionTrackerTest() It.IsAny())) .Returns(_mockChannel.Object); _sessionTracker = new SessionTracker(_mockChannelGroup.Object, _mockChannel.Object); - SessionTracker.SessionTimeout = 500; + SessionTracker.SessionTimeout = 10; } /// @@ -48,7 +48,7 @@ public void ResumeAfterTimeout() { _sessionTracker.Resume(); _sessionTracker.Pause(); - Task.Delay((int) SessionTracker.SessionTimeout).Wait(); + Task.Delay((int)SessionTracker.SessionTimeout * 2).Wait(); _sessionTracker.Resume(); _mockChannel.Verify(channel => channel.EnqueueAsync(It.IsAny()), Times.Exactly(2)); @@ -62,7 +62,7 @@ public void ResumeAfterTimeoutAndSendEvent() { _sessionTracker.Resume(); _sessionTracker.Pause(); - Task.Delay((int) SessionTracker.SessionTimeout).Wait(); + Task.Delay((int)SessionTracker.SessionTimeout * 2).Wait(); _mockChannel.Verify(channel => channel.EnqueueAsync(It.IsAny()), Times.Once()); _sessionTracker.Resume(); @@ -93,7 +93,7 @@ public void ResumeAfterShortPause() public void HandleEnqueuingLogDuringSession() { _sessionTracker.Resume(); - var eventLog = new EventLog {Timestamp = DateTime.Now}; + var eventLog = new EventLog { Timestamp = DateTime.Now }; _mockChannelGroup.Raise(group => group.EnqueuingLog += null, null, new EnqueuingLogEventArgs(eventLog)); Assert.IsNotNull(eventLog.Sid); } @@ -106,8 +106,8 @@ public void HandleEnueuingSecondLogDuringSession() { _sessionTracker.Resume(); var time = DateTime.Now; - var firstLog = new EventLog {Timestamp = time}; - var secondLog = new EventLog {Timestamp = time.AddMilliseconds(1)}; + var firstLog = new EventLog { Timestamp = time }; + var secondLog = new EventLog { Timestamp = time.AddMilliseconds(1) }; _mockChannelGroup.Raise(group => group.EnqueuingLog += null, null, new EnqueuingLogEventArgs(firstLog)); _mockChannelGroup.Raise(group => group.EnqueuingLog += null, null, new EnqueuingLogEventArgs(secondLog)); @@ -122,7 +122,7 @@ public void HandleEnueuingSecondLogDuringSession() public void HandleEnqueuingLogOutsideSession() { _sessionTracker.Pause(); - var eventLog = new EventLog {Name = "thisisaneventlog"}; + var eventLog = new EventLog { Name = "thisisaneventlog" }; var eventArgs = new EnqueuingLogEventArgs(eventLog); _mockChannelGroup.Raise(group => group.EnqueuingLog += null, null, eventArgs); @@ -153,9 +153,9 @@ public void HandleEnqueuingStartSessionLog() public void TestSetSessionIdLessThan() { var time = new DateTime(430 * TimeSpan.TicksPerMillisecond); - var log = new EventLog {Timestamp = time}; + var log = new EventLog { Timestamp = time }; var intendedSid = Guid.NewGuid(); - var sessions = new Dictionary {{4, Guid.Empty}, {429, intendedSid}, {431, Guid.Empty}}; + var sessions = new Dictionary { { 4, Guid.Empty }, { 429, intendedSid }, { 431, Guid.Empty } }; var success = SessionTracker.SetExistingSessionId(log, sessions); Assert.IsTrue(success); @@ -171,9 +171,9 @@ public void TestSetSessionIdLessThan() public void TestSetSessionIdEqualTo() { var time = new DateTime(430 * TimeSpan.TicksPerMillisecond); - var log = new EventLog {Timestamp = time}; + var log = new EventLog { Timestamp = time }; var intendedSid = Guid.NewGuid(); - var sessions = new Dictionary {{4, Guid.Empty}, {430, intendedSid}, {431, Guid.Empty}}; + var sessions = new Dictionary { { 4, Guid.Empty }, { 430, intendedSid }, { 431, Guid.Empty } }; var success = SessionTracker.SetExistingSessionId(log, sessions); Assert.IsTrue(success); @@ -187,8 +187,8 @@ public void TestSetSessionIdEqualTo() public void TestSetSessionIdNone() { var time = new DateTime(430 * TimeSpan.TicksPerMillisecond); - var log = new EventLog {Timestamp = time}; - var sessions = new Dictionary {{431, Guid.Empty}, {632, Guid.Empty}, {461, Guid.Empty}}; + var log = new EventLog { Timestamp = time }; + var sessions = new Dictionary { { 431, Guid.Empty }, { 632, Guid.Empty }, { 461, Guid.Empty } }; var success = SessionTracker.SetExistingSessionId(log, sessions); Assert.IsFalse(success); @@ -268,7 +268,7 @@ public void VerifyCorrelationIdIsUpdatedWhenSessionChanges() // Cause session expiration and start new session. _sessionTracker.Pause(); - Task.Delay((int) SessionTracker.SessionTimeout).Wait(); + Task.Delay((int)SessionTracker.SessionTimeout * 2).Wait(); _sessionTracker.Resume(); Assert.IsTrue(AppCenter.TestAndSetCorrelationId(_sessionTracker.Sid, ref AppCenter.Instance.InstanceCorrelationId)); @@ -293,7 +293,7 @@ public void VerifySessionChangesOnCorrelationIdUpdatedByOthers() // Cause session expiration and start new session. _sessionTracker.Pause(); - Task.Delay((int)SessionTracker.SessionTimeout).Wait(); + Task.Delay((int)SessionTracker.SessionTimeout * 2).Wait(); // Change correlation identifier. var externalCorrelationid = Guid.NewGuid(); From 75033568f56201876f1ef814836c3d48c615271d Mon Sep 17 00:00:00 2001 From: Ivan Matkov Date: Thu, 12 Apr 2018 21:43:48 +0300 Subject: [PATCH 35/46] Close ingestion when the channel group is shutdown --- .../Channel/ChannelGroup.cs | 6 ++---- .../Channel/ChannelGroupTest.cs | 16 ++++++++++------ 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/SDK/AppCenter/Microsoft.AppCenter.Windows.Shared/Channel/ChannelGroup.cs b/SDK/AppCenter/Microsoft.AppCenter.Windows.Shared/Channel/ChannelGroup.cs index 090766794..04091477e 100644 --- a/SDK/AppCenter/Microsoft.AppCenter.Windows.Shared/Channel/ChannelGroup.cs +++ b/SDK/AppCenter/Microsoft.AppCenter.Windows.Shared/Channel/ChannelGroup.cs @@ -103,6 +103,7 @@ public void SetEnabled(bool enabled) public async Task ShutdownAsync() { ThrowIfDisposed(); + var tasks = new List(); lock (_channelGroupLock) { if (_isShutdown) @@ -111,10 +112,7 @@ public async Task ShutdownAsync() return; } _isShutdown = true; - } - var tasks = new List(); - lock (_channelGroupLock) - { + _ingestion.Close(); foreach (var channel in _channels) { tasks.Add(channel.ShutdownAsync()); diff --git a/Tests/Microsoft.AppCenter.Test.Windows/Channel/ChannelGroupTest.cs b/Tests/Microsoft.AppCenter.Test.Windows/Channel/ChannelGroupTest.cs index 5801d5b52..68cff7f36 100644 --- a/Tests/Microsoft.AppCenter.Test.Windows/Channel/ChannelGroupTest.cs +++ b/Tests/Microsoft.AppCenter.Test.Windows/Channel/ChannelGroupTest.cs @@ -1,6 +1,7 @@ using System; using System.Collections.Generic; using System.Linq; +using System.Threading.Tasks; using Microsoft.AppCenter.Channel; using Microsoft.AppCenter.Ingestion; using Microsoft.AppCenter.Storage; @@ -9,6 +10,8 @@ namespace Microsoft.AppCenter.Test.Channel { + using Channel = Microsoft.AppCenter.Channel.Channel; + [TestClass] public class ChannelGroupTest { @@ -45,7 +48,7 @@ public void TestAddChannel() { const string channelName = "some_channel"; var addedChannel = - _channelGroup.AddChannel(channelName, 2, TimeSpan.FromSeconds(3), 3) as Microsoft.AppCenter.Channel.Channel; + _channelGroup.AddChannel(channelName, 2, TimeSpan.FromSeconds(3), 3) as Channel; Assert.IsNotNull(addedChannel); Assert.AreEqual(channelName, addedChannel.Name); @@ -168,8 +171,8 @@ public void TestEnableChannelGroup() foreach (var channelMock in channelMocks.Select(mock => mock as Mock)) { - channelMock.Verify(channel => channel.SetEnabled(It.Is(p => p)), Times.Once()); - channelMock.Verify(channel => channel.SetEnabled(It.Is(p => !p)), Times.Once()); + channelMock.Verify(channel => channel.SetEnabled(true), Times.Once); + channelMock.Verify(channel => channel.SetEnabled(false), Times.Once); } } @@ -184,15 +187,16 @@ public void TestDisposeChannelGroup() /// Veriy that all channels are disabled after channel group disabling /// [TestMethod] - public void TestShutdownChannelGroup() + public async Task TestShutdownChannelGroup() { const string channelName = "some_channel"; var addedChannel = - _channelGroup.AddChannel(channelName, 2, TimeSpan.FromSeconds(3), 3) as Microsoft.AppCenter.Channel.Channel; + _channelGroup.AddChannel(channelName, 2, TimeSpan.FromSeconds(3), 3) as Channel; - _channelGroup.ShutdownAsync().RunNotAsync(); + await _channelGroup.ShutdownAsync(); Assert.IsFalse(addedChannel.IsEnabled); + _mockIngestion.Verify(ingestion => ingestion.Close(), Times.Once); } } } From 488530c61c9e112f816f1c05809c82447b07716a Mon Sep 17 00:00:00 2001 From: Guillaume Perrot Date: Tue, 10 Apr 2018 14:17:21 -0700 Subject: [PATCH 36/46] Fix renewing session id on disable/enable analytics --- .../Channel/SessionTracker.cs | 15 ++++++++++----- .../SessionTrackerTest.cs | 18 ++++++++++++++++++ 2 files changed, 28 insertions(+), 5 deletions(-) diff --git a/SDK/AppCenterAnalytics/Microsoft.AppCenter.Analytics.Windows.Shared/Channel/SessionTracker.cs b/SDK/AppCenterAnalytics/Microsoft.AppCenter.Analytics.Windows.Shared/Channel/SessionTracker.cs index a8bc132e9..387a293ac 100644 --- a/SDK/AppCenterAnalytics/Microsoft.AppCenter.Analytics.Windows.Shared/Channel/SessionTracker.cs +++ b/SDK/AppCenterAnalytics/Microsoft.AppCenter.Analytics.Windows.Shared/Channel/SessionTracker.cs @@ -31,7 +31,8 @@ private enum SessionState // Some fields are internal for testing internal static long SessionTimeout = 20000; private readonly IChannelUnit _channel; - internal Guid Sid = Guid.Empty; + private readonly Guid _initialGuid; + internal Guid Sid; private long _lastQueuedLogTime; private long _lastResumedTime; private long _lastPausedTime; @@ -44,6 +45,10 @@ public SessionTracker(IChannel channelGroup, IChannelUnit channel) { _channel = channel; channelGroup.EnqueuingLog += HandleEnqueuingLog; +#pragma warning disable 612 + AppCenter.TestAndSetCorrelationId(Guid.Empty, ref _initialGuid); + Sid = _initialGuid; +#pragma warning restore 612 } } @@ -97,7 +102,7 @@ private void HandleEnqueuingLog(object sender, EnqueuingLogEventArgs e) private void SendStartSessionIfNeeded() { var now = TimeHelper.CurrentTimeInMilliseconds(); - if (Sid != Guid.Empty && !HasSessionTimedOut(now)) + if (Sid != _initialGuid && !HasSessionTimedOut(now)) { return; } @@ -119,7 +124,7 @@ private bool HasSessionTimedOut(long now) // Internal and static so that it can be tested more easily internal static bool HasSessionTimedOut(long now, long lastQueuedLogTime, long lastResumedTime, long lastPausedTime) { - var noLogSentForLong = lastQueuedLogTime == 0 || (now - lastQueuedLogTime) >= SessionTimeout; + var noLogSentForLong = lastQueuedLogTime == 0 || now - lastQueuedLogTime >= SessionTimeout; if (lastPausedTime == 0) { return lastResumedTime == 0 && noLogSentForLong; @@ -128,8 +133,8 @@ internal static bool HasSessionTimedOut(long now, long lastQueuedLogTime, long l { return noLogSentForLong; } - var isBackgroundForLong = (lastPausedTime >= lastResumedTime) && ((now - lastPausedTime) >= SessionTimeout); - var wasBackgroundForLong = (lastResumedTime - Math.Max(lastPausedTime, lastQueuedLogTime)) >= SessionTimeout; + var isBackgroundForLong = lastPausedTime >= lastResumedTime && now - lastPausedTime >= SessionTimeout; + var wasBackgroundForLong = lastResumedTime - Math.Max(lastPausedTime, lastQueuedLogTime) >= SessionTimeout; AppCenterLog.Debug(Analytics.Instance.LogTag, $"noLogSentForLong={noLogSentForLong} " + $"isBackgroundForLong={isBackgroundForLong} " + $"wasBackgroundForLong={wasBackgroundForLong}"); diff --git a/Tests/Microsoft.AppCenter.Analytics.Test.Windows/SessionTrackerTest.cs b/Tests/Microsoft.AppCenter.Analytics.Test.Windows/SessionTrackerTest.cs index 868d64234..495ba90c4 100644 --- a/Tests/Microsoft.AppCenter.Analytics.Test.Windows/SessionTrackerTest.cs +++ b/Tests/Microsoft.AppCenter.Analytics.Test.Windows/SessionTrackerTest.cs @@ -233,6 +233,7 @@ public void EmptyCorrelationIdIsSetWhenSessionStarts() // Correlation ID is Empty. AppCenter.Instance.InstanceCorrelationId = Guid.Empty; + _sessionTracker = new SessionTracker(_mockChannelGroup.Object, _mockChannel.Object); _sessionTracker.Resume(); // Guid.Empty should not be equal to correlation id. @@ -309,5 +310,22 @@ public void VerifySessionChangesOnCorrelationIdUpdatedByOthers() Assert.AreNotEqual(sid1, sid2); Assert.AreEqual(externalCorrelationid, sid2); } + + [TestMethod] + public void VerifySessionChangesOnReenabling() + { + _sessionTracker.Resume(); + var sid1 = _sessionTracker.Sid; + Assert.AreNotEqual(Guid.Empty, sid1); + + // Disable and enable again. + _sessionTracker = new SessionTracker(_mockChannelGroup.Object, _mockChannel.Object); + _sessionTracker.Resume(); + + // Verify second session has a different identifier, not the new one analytics wanted but the updated correlation identifier instead. + var sid2 = _sessionTracker.Sid; + Assert.AreNotEqual(Guid.Empty, sid2); + Assert.AreNotEqual(sid1, sid2); + } } } \ No newline at end of file From a1e3d95396beb3ea12ce89810ebe0783368690da Mon Sep 17 00:00:00 2001 From: Guillaume Perrot Date: Tue, 10 Apr 2018 17:43:56 -0700 Subject: [PATCH 37/46] Refactoring --- .../Channel/SessionTracker.cs | 8 ++++---- .../SessionTrackerTest.cs | 9 +++++++-- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/SDK/AppCenterAnalytics/Microsoft.AppCenter.Analytics.Windows.Shared/Channel/SessionTracker.cs b/SDK/AppCenterAnalytics/Microsoft.AppCenter.Analytics.Windows.Shared/Channel/SessionTracker.cs index 387a293ac..bda406c2c 100644 --- a/SDK/AppCenterAnalytics/Microsoft.AppCenter.Analytics.Windows.Shared/Channel/SessionTracker.cs +++ b/SDK/AppCenterAnalytics/Microsoft.AppCenter.Analytics.Windows.Shared/Channel/SessionTracker.cs @@ -31,7 +31,7 @@ private enum SessionState // Some fields are internal for testing internal static long SessionTimeout = 20000; private readonly IChannelUnit _channel; - private readonly Guid _initialGuid; + private readonly Guid _initialSid; internal Guid Sid; private long _lastQueuedLogTime; private long _lastResumedTime; @@ -46,9 +46,9 @@ public SessionTracker(IChannel channelGroup, IChannelUnit channel) _channel = channel; channelGroup.EnqueuingLog += HandleEnqueuingLog; #pragma warning disable 612 - AppCenter.TestAndSetCorrelationId(Guid.Empty, ref _initialGuid); - Sid = _initialGuid; + AppCenter.TestAndSetCorrelationId(Guid.Empty, ref _initialSid); #pragma warning restore 612 + Sid = _initialSid; } } @@ -102,7 +102,7 @@ private void HandleEnqueuingLog(object sender, EnqueuingLogEventArgs e) private void SendStartSessionIfNeeded() { var now = TimeHelper.CurrentTimeInMilliseconds(); - if (Sid != _initialGuid && !HasSessionTimedOut(now)) + if (Sid != _initialSid && !HasSessionTimedOut(now)) { return; } diff --git a/Tests/Microsoft.AppCenter.Analytics.Test.Windows/SessionTrackerTest.cs b/Tests/Microsoft.AppCenter.Analytics.Test.Windows/SessionTrackerTest.cs index 495ba90c4..c1da8c8bd 100644 --- a/Tests/Microsoft.AppCenter.Analytics.Test.Windows/SessionTrackerTest.cs +++ b/Tests/Microsoft.AppCenter.Analytics.Test.Windows/SessionTrackerTest.cs @@ -262,22 +262,27 @@ public void SidIsInitialCorrelationId() [TestMethod] public void VerifyCorrelationIdIsUpdatedWhenSessionChanges() { + var initialSid = Guid.Empty; #pragma warning disable CS0612 // Type or member is obsolete + AppCenter.TestAndSetCorrelationId(Guid.Empty, ref initialSid); +#pragma warning restore CS0612 // Type or member is obsolete _sessionTracker.Resume(); var sid1 = _sessionTracker.Sid; - Assert.AreNotEqual(Guid.Empty, sid1); + Assert.AreNotEqual(initialSid, sid1); // Cause session expiration and start new session. _sessionTracker.Pause(); Task.Delay((int)SessionTracker.SessionTimeout * 2).Wait(); _sessionTracker.Resume(); + +#pragma warning disable CS0612 // Type or member is obsolete Assert.IsTrue(AppCenter.TestAndSetCorrelationId(_sessionTracker.Sid, ref AppCenter.Instance.InstanceCorrelationId)); #pragma warning restore CS0612 // Type or member is obsolete // Verify second session has a different identifier. var sid2 = _sessionTracker.Sid; - Assert.AreNotEqual(Guid.Empty, sid2); + Assert.AreNotEqual(initialSid, sid2); Assert.AreNotEqual(sid1, sid2); } From 81bb2b09befe7f65c787aaf9749c908f4463eebf Mon Sep 17 00:00:00 2001 From: Guillaume Perrot Date: Tue, 10 Apr 2018 18:00:04 -0700 Subject: [PATCH 38/46] Fix a check --- .../Channel/SessionTracker.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/SDK/AppCenterAnalytics/Microsoft.AppCenter.Analytics.Windows.Shared/Channel/SessionTracker.cs b/SDK/AppCenterAnalytics/Microsoft.AppCenter.Analytics.Windows.Shared/Channel/SessionTracker.cs index bda406c2c..72b866b19 100644 --- a/SDK/AppCenterAnalytics/Microsoft.AppCenter.Analytics.Windows.Shared/Channel/SessionTracker.cs +++ b/SDK/AppCenterAnalytics/Microsoft.AppCenter.Analytics.Windows.Shared/Channel/SessionTracker.cs @@ -94,7 +94,10 @@ private void HandleEnqueuingLog(object sender, EnqueuingLogEventArgs e) return; } SendStartSessionIfNeeded(); - e.Log.Sid = Sid == Guid.Empty ? null : new Guid?(Sid); + if (Sid != _initialSid) + { + e.Log.Sid = Sid; + } _lastQueuedLogTime = TimeHelper.CurrentTimeInMilliseconds(); } } From f3fb83014e8a2a1ef7ab2c7eb029a39c4589053c Mon Sep 17 00:00:00 2001 From: Guillaume Perrot Date: Tue, 10 Apr 2018 18:02:27 -0700 Subject: [PATCH 39/46] Remove a condition that could never happen --- .../Channel/SessionTracker.cs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/SDK/AppCenterAnalytics/Microsoft.AppCenter.Analytics.Windows.Shared/Channel/SessionTracker.cs b/SDK/AppCenterAnalytics/Microsoft.AppCenter.Analytics.Windows.Shared/Channel/SessionTracker.cs index 72b866b19..330282fea 100644 --- a/SDK/AppCenterAnalytics/Microsoft.AppCenter.Analytics.Windows.Shared/Channel/SessionTracker.cs +++ b/SDK/AppCenterAnalytics/Microsoft.AppCenter.Analytics.Windows.Shared/Channel/SessionTracker.cs @@ -94,10 +94,7 @@ private void HandleEnqueuingLog(object sender, EnqueuingLogEventArgs e) return; } SendStartSessionIfNeeded(); - if (Sid != _initialSid) - { - e.Log.Sid = Sid; - } + e.Log.Sid = Sid; _lastQueuedLogTime = TimeHelper.CurrentTimeInMilliseconds(); } } From ba0b175f54cc89409173767036b4e1e392e62339 Mon Sep 17 00:00:00 2001 From: Guillaume Perrot Date: Thu, 12 Apr 2018 19:49:19 -0700 Subject: [PATCH 40/46] Refine the fix for session reenabling --- .../Channel/SessionTracker.cs | 13 ++++----- .../SessionTrackerTest.cs | 28 +++++++++---------- 2 files changed, 19 insertions(+), 22 deletions(-) diff --git a/SDK/AppCenterAnalytics/Microsoft.AppCenter.Analytics.Windows.Shared/Channel/SessionTracker.cs b/SDK/AppCenterAnalytics/Microsoft.AppCenter.Analytics.Windows.Shared/Channel/SessionTracker.cs index 330282fea..96d46341b 100644 --- a/SDK/AppCenterAnalytics/Microsoft.AppCenter.Analytics.Windows.Shared/Channel/SessionTracker.cs +++ b/SDK/AppCenterAnalytics/Microsoft.AppCenter.Analytics.Windows.Shared/Channel/SessionTracker.cs @@ -31,8 +31,11 @@ private enum SessionState // Some fields are internal for testing internal static long SessionTimeout = 20000; private readonly IChannelUnit _channel; - private readonly Guid _initialSid; - internal Guid Sid; + + // Since we don't have session history anymore, when disabling /enabling analytics a new instance is created. + // But the correlation identifier in AppCenter is static and thus updating session will fail test and set if we don't know previous value. + // The field is thus static to remember previous sessions across instances... Internal because read and reset in tests. + internal static Guid Sid; private long _lastQueuedLogTime; private long _lastResumedTime; private long _lastPausedTime; @@ -45,10 +48,6 @@ public SessionTracker(IChannel channelGroup, IChannelUnit channel) { _channel = channel; channelGroup.EnqueuingLog += HandleEnqueuingLog; -#pragma warning disable 612 - AppCenter.TestAndSetCorrelationId(Guid.Empty, ref _initialSid); -#pragma warning restore 612 - Sid = _initialSid; } } @@ -102,7 +101,7 @@ private void HandleEnqueuingLog(object sender, EnqueuingLogEventArgs e) private void SendStartSessionIfNeeded() { var now = TimeHelper.CurrentTimeInMilliseconds(); - if (Sid != _initialSid && !HasSessionTimedOut(now)) + if (_lastQueuedLogTime > 0 && !HasSessionTimedOut(now)) { return; } diff --git a/Tests/Microsoft.AppCenter.Analytics.Test.Windows/SessionTrackerTest.cs b/Tests/Microsoft.AppCenter.Analytics.Test.Windows/SessionTrackerTest.cs index c1da8c8bd..f3e992e41 100644 --- a/Tests/Microsoft.AppCenter.Analytics.Test.Windows/SessionTrackerTest.cs +++ b/Tests/Microsoft.AppCenter.Analytics.Test.Windows/SessionTrackerTest.cs @@ -27,6 +27,7 @@ public void InitializeSessionTrackerTest() .Returns(_mockChannel.Object); _sessionTracker = new SessionTracker(_mockChannelGroup.Object, _mockChannel.Object); SessionTracker.SessionTimeout = 10; + SessionTracker.Sid = Guid.Empty; } /// @@ -251,8 +252,9 @@ public void SidIsInitialCorrelationId() var initialCorrelationId = Guid.NewGuid(); AppCenter.Instance.InstanceCorrelationId = initialCorrelationId; + _sessionTracker = new SessionTracker(_mockChannelGroup.Object, _mockChannel.Object); _sessionTracker.Resume(); - Assert.AreEqual(_sessionTracker.Sid, initialCorrelationId); + Assert.AreEqual(SessionTracker.Sid, initialCorrelationId); #pragma warning restore CS0612 // Type or member is obsolete } @@ -262,27 +264,23 @@ public void SidIsInitialCorrelationId() [TestMethod] public void VerifyCorrelationIdIsUpdatedWhenSessionChanges() { - var initialSid = Guid.Empty; #pragma warning disable CS0612 // Type or member is obsolete - AppCenter.TestAndSetCorrelationId(Guid.Empty, ref initialSid); -#pragma warning restore CS0612 // Type or member is obsolete _sessionTracker.Resume(); - var sid1 = _sessionTracker.Sid; - Assert.AreNotEqual(initialSid, sid1); + var sid1 = SessionTracker.Sid; + Assert.AreNotEqual(Guid.Empty, sid1); // Cause session expiration and start new session. _sessionTracker.Pause(); Task.Delay((int)SessionTracker.SessionTimeout * 2).Wait(); _sessionTracker.Resume(); -#pragma warning disable CS0612 // Type or member is obsolete - Assert.IsTrue(AppCenter.TestAndSetCorrelationId(_sessionTracker.Sid, + Assert.IsTrue(AppCenter.TestAndSetCorrelationId(SessionTracker.Sid, ref AppCenter.Instance.InstanceCorrelationId)); #pragma warning restore CS0612 // Type or member is obsolete // Verify second session has a different identifier. - var sid2 = _sessionTracker.Sid; - Assert.AreNotEqual(initialSid, sid2); + var sid2 = SessionTracker.Sid; + Assert.AreNotEqual(Guid.Empty, sid2); Assert.AreNotEqual(sid1, sid2); } @@ -294,7 +292,7 @@ public void VerifySessionChangesOnCorrelationIdUpdatedByOthers() { #pragma warning disable CS0612 // Type or member is obsolete _sessionTracker.Resume(); - var sid1 = _sessionTracker.Sid; + var sid1 = SessionTracker.Sid; Assert.AreNotEqual(Guid.Empty, sid1); // Cause session expiration and start new session. @@ -303,14 +301,14 @@ public void VerifySessionChangesOnCorrelationIdUpdatedByOthers() // Change correlation identifier. var externalCorrelationid = Guid.NewGuid(); - Assert.IsTrue(AppCenter.TestAndSetCorrelationId(_sessionTracker.Sid, + Assert.IsTrue(AppCenter.TestAndSetCorrelationId(SessionTracker.Sid, ref externalCorrelationid)); _sessionTracker.Resume(); #pragma warning restore CS0612 // Type or member is obsolete // Verify second session has a different identifier, not the new one analytics wanted but the updated correlation identifier instead. - var sid2 = _sessionTracker.Sid; + var sid2 = SessionTracker.Sid; Assert.AreNotEqual(Guid.Empty, sid2); Assert.AreNotEqual(sid1, sid2); Assert.AreEqual(externalCorrelationid, sid2); @@ -320,7 +318,7 @@ public void VerifySessionChangesOnCorrelationIdUpdatedByOthers() public void VerifySessionChangesOnReenabling() { _sessionTracker.Resume(); - var sid1 = _sessionTracker.Sid; + var sid1 = SessionTracker.Sid; Assert.AreNotEqual(Guid.Empty, sid1); // Disable and enable again. @@ -328,7 +326,7 @@ public void VerifySessionChangesOnReenabling() _sessionTracker.Resume(); // Verify second session has a different identifier, not the new one analytics wanted but the updated correlation identifier instead. - var sid2 = _sessionTracker.Sid; + var sid2 = SessionTracker.Sid; Assert.AreNotEqual(Guid.Empty, sid2); Assert.AreNotEqual(sid1, sid2); } From 50909105f545e7ed8698d686f2df87dbcfb40509 Mon Sep 17 00:00:00 2001 From: Guillaume Perrot Date: Thu, 12 Apr 2018 19:52:18 -0700 Subject: [PATCH 41/46] Rollback unnecessary changes --- .../SessionTrackerTest.cs | 3 --- 1 file changed, 3 deletions(-) diff --git a/Tests/Microsoft.AppCenter.Analytics.Test.Windows/SessionTrackerTest.cs b/Tests/Microsoft.AppCenter.Analytics.Test.Windows/SessionTrackerTest.cs index f3e992e41..df8a200c4 100644 --- a/Tests/Microsoft.AppCenter.Analytics.Test.Windows/SessionTrackerTest.cs +++ b/Tests/Microsoft.AppCenter.Analytics.Test.Windows/SessionTrackerTest.cs @@ -234,7 +234,6 @@ public void EmptyCorrelationIdIsSetWhenSessionStarts() // Correlation ID is Empty. AppCenter.Instance.InstanceCorrelationId = Guid.Empty; - _sessionTracker = new SessionTracker(_mockChannelGroup.Object, _mockChannel.Object); _sessionTracker.Resume(); // Guid.Empty should not be equal to correlation id. @@ -252,7 +251,6 @@ public void SidIsInitialCorrelationId() var initialCorrelationId = Guid.NewGuid(); AppCenter.Instance.InstanceCorrelationId = initialCorrelationId; - _sessionTracker = new SessionTracker(_mockChannelGroup.Object, _mockChannel.Object); _sessionTracker.Resume(); Assert.AreEqual(SessionTracker.Sid, initialCorrelationId); #pragma warning restore CS0612 // Type or member is obsolete @@ -273,7 +271,6 @@ public void VerifyCorrelationIdIsUpdatedWhenSessionChanges() _sessionTracker.Pause(); Task.Delay((int)SessionTracker.SessionTimeout * 2).Wait(); _sessionTracker.Resume(); - Assert.IsTrue(AppCenter.TestAndSetCorrelationId(SessionTracker.Sid, ref AppCenter.Instance.InstanceCorrelationId)); #pragma warning restore CS0612 // Type or member is obsolete From ff2e9901b63eaa680715c288c98de2e98970d9fb Mon Sep 17 00:00:00 2001 From: Ivan Matkov Date: Fri, 13 Apr 2018 13:32:41 +0300 Subject: [PATCH 42/46] Use base dictionary class for push custom data --- .../ApiDefinition.cs | 2 +- .../Microsoft.AppCenter.Push.iOS/Push.cs | 16 ++-------------- 2 files changed, 3 insertions(+), 15 deletions(-) diff --git a/SDK/AppCenterPush/Microsoft.AppCenter.Push.iOS.Bindings/ApiDefinition.cs b/SDK/AppCenterPush/Microsoft.AppCenter.Push.iOS.Bindings/ApiDefinition.cs index 88ef9c010..c5d4b7eed 100644 --- a/SDK/AppCenterPush/Microsoft.AppCenter.Push.iOS.Bindings/ApiDefinition.cs +++ b/SDK/AppCenterPush/Microsoft.AppCenter.Push.iOS.Bindings/ApiDefinition.cs @@ -63,6 +63,6 @@ interface MSPushNotification //@property(nonatomic, copy, readonly) NSDictionary *customData; [Export("customData")] - NSDictionary CustomData { get; } + NSDictionary CustomData { get; } } } diff --git a/SDK/AppCenterPush/Microsoft.AppCenter.Push.iOS/Push.cs b/SDK/AppCenterPush/Microsoft.AppCenter.Push.iOS/Push.cs index 60644bd9c..fa3ade9d7 100644 --- a/SDK/AppCenterPush/Microsoft.AppCenter.Push.iOS/Push.cs +++ b/SDK/AppCenterPush/Microsoft.AppCenter.Push.iOS/Push.cs @@ -1,5 +1,5 @@ using System; -using System.Collections.Generic; +using System.Linq; using System.Threading.Tasks; using Foundation; using Microsoft.AppCenter.Push.iOS; @@ -20,7 +20,7 @@ static Push() { Title = notification.Title, Message = notification.Message, - CustomData = NSDictionaryToDotNet(notification.CustomData) + CustomData = notification.CustomData?.ToDictionary(i => i.Key.ToString(), i => i.Value.ToString()) }; PushNotificationReceived?.Invoke(null, pushEventArgs); }; @@ -47,8 +47,6 @@ public static Type BindingType } } - private static event EventHandler PlatformPushNotificationReceived; - /// /// Call this from the corresponding method override in your AppDelegate. /// @@ -71,15 +69,5 @@ public static bool DidReceiveRemoteNotification(NSDictionary userInfo) { return MSPush.DidReceiveRemoteNotification(userInfo); } - - private static IDictionary NSDictionaryToDotNet(NSDictionary nsdict) - { - var dict = new Dictionary(); - foreach (var key in nsdict.Keys) - { - dict[key.ToString()] = nsdict.ObjectForKey(key); - } - return dict; - } } } From ade9829b7c281a8616bf492f7c236eefe01d7cad Mon Sep 17 00:00:00 2001 From: snrnats Date: Sat, 14 Apr 2018 10:46:54 +0300 Subject: [PATCH 43/46] Inlined GetAwaiter().GetResult() in unit tests (reverted from commit 1d9c724e70f978798c17043b9c3ed2146ae1b689) --- .../AppCenterTest.cs | 8 ++-- .../Channel/ChannelGroupTest.cs | 2 +- .../Channel/ChannelTest.cs | 38 +++++++++---------- .../Ingestion/Http/IngestionHttpTest.cs | 9 ++--- .../Ingestion/Http/NetworkStateTest.cs | 2 +- .../Ingestion/Http/RetryableTest.cs | 23 ++++------- .../Ingestion/Http/ServiceCallTest.cs | 7 +--- .../Models/CustomPropertiesLogTest.cs | 4 +- .../Ingestion/Models/StartServiceLogTest.cs | 4 +- .../Storage/FakeStorageTest.cs | 18 ++++----- .../Storage/StorageTest.cs | 38 +++++++++---------- .../TaskExtension.cs | 9 +++++ 12 files changed, 78 insertions(+), 84 deletions(-) diff --git a/Tests/Microsoft.AppCenter.Test.Windows/AppCenterTest.cs b/Tests/Microsoft.AppCenter.Test.Windows/AppCenterTest.cs index 40d421720..9d8a20b36 100644 --- a/Tests/Microsoft.AppCenter.Test.Windows/AppCenterTest.cs +++ b/Tests/Microsoft.AppCenter.Test.Windows/AppCenterTest.cs @@ -160,7 +160,7 @@ public void GetEnabled() public void SetEnabledSameValue() { AppCenter.Start("appsecret", typeof(MockAppCenterService)); - AppCenter.SetEnabledAsync(AppCenter.IsEnabledAsync().Result).GetAwaiter().GetResult(); + AppCenter.SetEnabledAsync(AppCenter.IsEnabledAsync().Result).RunNotAsync(); MockAppCenterService.Mock.VerifySet(service => service.InstanceEnabled = It.IsAny(), Times.Never()); _settingsMock.Verify(settings => settings.SetValue(AppCenter.EnabledKey, It.IsAny()), Times.Never()); @@ -175,7 +175,7 @@ public void SetEnabledDifferentValueAfterConfigure() { AppCenter.Start("appsecret", typeof(MockAppCenterService)); var setVal = !AppCenter.IsEnabledAsync().Result; - AppCenter.SetEnabledAsync(setVal).GetAwaiter().GetResult(); + AppCenter.SetEnabledAsync(setVal).RunNotAsync(); MockAppCenterService.Mock.VerifySet(service => service.InstanceEnabled = setVal, Times.Once()); _settingsMock.Verify(settings => settings.SetValue(AppCenter.EnabledKey, setVal), Times.Once()); @@ -190,7 +190,7 @@ public void SetEnabledDifferentValueBeforeConfigure() { _settingsMock.Setup(settings => settings.GetValue(AppCenter.EnabledKey, It.IsAny())) .Returns(true); - AppCenter.SetEnabledAsync(false).GetAwaiter().GetResult(); + AppCenter.SetEnabledAsync(false).RunNotAsync(); AppCenter.Start("appsecret", typeof(MockAppCenterService)); _settingsMock.Verify(settings => settings.SetValue(AppCenter.EnabledKey, false), Times.Once()); @@ -587,7 +587,7 @@ public void SendStartServicesAfterEnable() _settingsMock.SetupSequence(settings => settings.GetValue(AppCenter.EnabledKey, It.IsAny())) .Returns(false).Returns(true); - AppCenter.SetEnabledAsync(true).GetAwaiter().GetResult(); + AppCenter.SetEnabledAsync(true).RunNotAsync(); _channelMock.Verify(channel => channel.EnqueueAsync(It.Is(log => log.Services.Count == 1 && log.Services[0] == MockAppCenterService.Instance.ServiceName)), Times.Once()); diff --git a/Tests/Microsoft.AppCenter.Test.Windows/Channel/ChannelGroupTest.cs b/Tests/Microsoft.AppCenter.Test.Windows/Channel/ChannelGroupTest.cs index a807b6dc6..5801d5b52 100644 --- a/Tests/Microsoft.AppCenter.Test.Windows/Channel/ChannelGroupTest.cs +++ b/Tests/Microsoft.AppCenter.Test.Windows/Channel/ChannelGroupTest.cs @@ -190,7 +190,7 @@ public void TestShutdownChannelGroup() var addedChannel = _channelGroup.AddChannel(channelName, 2, TimeSpan.FromSeconds(3), 3) as Microsoft.AppCenter.Channel.Channel; - _channelGroup.ShutdownAsync().GetAwaiter().GetResult(); + _channelGroup.ShutdownAsync().RunNotAsync(); Assert.IsFalse(addedChannel.IsEnabled); } diff --git a/Tests/Microsoft.AppCenter.Test.Windows/Channel/ChannelTest.cs b/Tests/Microsoft.AppCenter.Test.Windows/Channel/ChannelTest.cs index 930ef18b8..9c91bb7fc 100644 --- a/Tests/Microsoft.AppCenter.Test.Windows/Channel/ChannelTest.cs +++ b/Tests/Microsoft.AppCenter.Test.Windows/Channel/ChannelTest.cs @@ -123,7 +123,7 @@ public void EnqueuedLogsAreSame() sem.Release(); }; - _channel.EnqueueAsync(log).GetAwaiter().GetResult(); + _channel.EnqueueAsync(log).RunNotAsync(); Assert.IsTrue(sem.Wait(DefaultWaitTime)); } @@ -136,7 +136,7 @@ public void EnqueueMaxLogs() SetChannelWithTimeSpan(TimeSpan.FromHours(1)); for (var i = 0; i < MaxLogsPerBatch; ++i) { - _channel.EnqueueAsync(new TestLog()).GetAwaiter().GetResult(); + _channel.EnqueueAsync(new TestLog()).RunNotAsync(); } Assert.IsTrue(SendingLogOccurred(1)); } @@ -149,7 +149,7 @@ public void EnqueueWhileDisabled() { _channel.SetEnabled(false); var log = new TestLog(); - _channel.EnqueueAsync(log).GetAwaiter().GetResult(); + _channel.EnqueueAsync(log).RunNotAsync(); Assert.IsTrue(FailedToSendLogOccurred(1)); Assert.IsFalse(EnqueuingLogOccurred(1)); } @@ -159,7 +159,7 @@ public void ChannelInvokesFilteringLogEvent() { for (var i = 0; i < MaxLogsPerBatch; ++i) { - _channel.EnqueueAsync(new TestLog()).GetAwaiter().GetResult(); + _channel.EnqueueAsync(new TestLog()).RunNotAsync(); } Assert.IsTrue(FilteringLogOccurred(MaxLogsPerBatch)); @@ -174,7 +174,7 @@ public void FilterLogShouldNotSend() _channel.FilteringLog += (sender, args) => args.FilterRequested = true; for (int i = 0; i < MaxLogsPerBatch; ++i) { - _channel.EnqueueAsync(new TestLog()).GetAwaiter().GetResult(); + _channel.EnqueueAsync(new TestLog()).RunNotAsync(); } Assert.IsTrue(FilteringLogOccurred(MaxLogsPerBatch)); Assert.IsFalse(SendingLogOccurred(MaxLogsPerBatch)); @@ -191,7 +191,7 @@ public void FilterLogThenCancelFilterLogInAnotherHandlerShouldSend() _channel.FilteringLog += (sender, args) => args.FilterRequested = false; for (int i = 0; i < MaxLogsPerBatch; ++i) { - _channel.EnqueueAsync(new TestLog()).GetAwaiter().GetResult(); + _channel.EnqueueAsync(new TestLog()).RunNotAsync(); } Assert.IsTrue(FilteringLogOccurred(MaxLogsPerBatch)); Assert.IsTrue(SendingLogOccurred(MaxLogsPerBatch)); @@ -203,7 +203,7 @@ public void ChannelInvokesSendingLogEvent() { for (var i = 0; i < MaxLogsPerBatch; ++i) { - _channel.EnqueueAsync(new TestLog()).GetAwaiter().GetResult(); + _channel.EnqueueAsync(new TestLog()).RunNotAsync(); } Assert.IsTrue(SendingLogOccurred(MaxLogsPerBatch)); @@ -214,7 +214,7 @@ public void ChannelInvokesSentLogEvent() { for (var i = 0; i < MaxLogsPerBatch; ++i) { - _channel.EnqueueAsync(new TestLog()).GetAwaiter().GetResult(); + _channel.EnqueueAsync(new TestLog()).RunNotAsync(); } Assert.IsTrue(SentLogOccurred(MaxLogsPerBatch)); @@ -226,7 +226,7 @@ public void ChannelInvokesFailedToSendLogEvent() MakeIngestionCallsFail(); for (var i = 0; i < MaxLogsPerBatch; ++i) { - _channel.EnqueueAsync(new TestLog()).GetAwaiter().GetResult(); + _channel.EnqueueAsync(new TestLog()).RunNotAsync(); } Assert.IsTrue(FailedToSendLogOccurred(MaxLogsPerBatch)); @@ -251,10 +251,10 @@ public void FailedToSendLogEventArgsAreSame() [TestMethod] public void ChannelInvokesSendingLogEventAfterEnabling() { - _channel.ShutdownAsync().GetAwaiter().GetResult(); + _channel.ShutdownAsync().RunNotAsync(); for (int i = 0; i < MaxLogsPerBatch; ++i) { - _channel.EnqueueAsync(new TestLog()).GetAwaiter().GetResult(); + _channel.EnqueueAsync(new TestLog()).RunNotAsync(); } _channel.SetEnabled(true); @@ -271,7 +271,7 @@ public void ChannelInvokesFailedToSendLogEventAfterDisabling() _channel.SetEnabled(false); for (int i = 0; i < MaxLogsPerBatch; ++i) { - _channel.EnqueueAsync(new TestLog()).GetAwaiter().GetResult(); + _channel.EnqueueAsync(new TestLog()).RunNotAsync(); } Assert.IsTrue(SendingLogOccurred(MaxLogsPerBatch)); @@ -284,10 +284,10 @@ public void ChannelInvokesFailedToSendLogEventAfterDisabling() [TestMethod] public void ClearLogs() { - _channel.ShutdownAsync().GetAwaiter().GetResult(); - _channel.EnqueueAsync(new TestLog()).GetAwaiter().GetResult(); + _channel.ShutdownAsync().RunNotAsync(); + _channel.EnqueueAsync(new TestLog()).RunNotAsync(); - _channel.ClearAsync().GetAwaiter().GetResult(); + _channel.ClearAsync().RunNotAsync(); _channel.SetEnabled(true); Assert.IsFalse(SendingLogOccurred(1)); @@ -333,8 +333,8 @@ public void ThrowStorageExceptionInDeleteLogsTime() SetupEventCallbacks(); // Shutdown channel and store some log - _channel.ShutdownAsync().GetAwaiter().GetResult(); - _channel.EnqueueAsync(log).GetAwaiter().GetResult(); + _channel.ShutdownAsync().RunNotAsync(); + _channel.EnqueueAsync(log).RunNotAsync(); _channel.SetEnabled(true); @@ -351,7 +351,7 @@ public void IngestionNotClosedOnRecoverableHttpError() { _mockIngestion.CallShouldSucceed = false; _mockIngestion.TaskError = new RecoverableIngestionException(); - _channel.EnqueueAsync(new TestLog()).GetAwaiter().GetResult(); + _channel.EnqueueAsync(new TestLog()).RunNotAsync(); // wait for SendingLog event _eventSemaphores[SendingLogSemaphoreIdx].Wait(); @@ -369,7 +369,7 @@ public void IngestionClosedOnNonRecoverableHttpError() { _mockIngestion.CallShouldSucceed = false; _mockIngestion.TaskError = new NonRecoverableIngestionException(); - _channel.EnqueueAsync(new TestLog()).GetAwaiter().GetResult(); + _channel.EnqueueAsync(new TestLog()).RunNotAsync(); // wait up to 20 seconds for suspend to finish bool disabled = WaitForChannelDisable(TimeSpan.FromSeconds(20)); diff --git a/Tests/Microsoft.AppCenter.Test.Windows/Ingestion/Http/IngestionHttpTest.cs b/Tests/Microsoft.AppCenter.Test.Windows/Ingestion/Http/IngestionHttpTest.cs index 725b998b3..44d7ed7a9 100644 --- a/Tests/Microsoft.AppCenter.Test.Windows/Ingestion/Http/IngestionHttpTest.cs +++ b/Tests/Microsoft.AppCenter.Test.Windows/Ingestion/Http/IngestionHttpTest.cs @@ -29,7 +29,7 @@ public void IngestionHttpStatusCodeOk() { var call = PrepareServiceCall(); SetupAdapterSendResponse(HttpStatusCode.OK); - _ingestionHttp.ExecuteCallAsync(call).GetAwaiter().GetResult(); + _ingestionHttp.ExecuteCallAsync(call).RunNotAsync(); VerifyAdapterSend(Times.Once()); // No throw any exception @@ -43,10 +43,7 @@ public void IngestionHttpStatusCodeError() { var call = PrepareServiceCall(); SetupAdapterSendResponse(HttpStatusCode.NotFound); - Assert.ThrowsException(() => - { - _ingestionHttp.ExecuteCallAsync(call).GetAwaiter().GetResult(); - }); + Assert.ThrowsException(() => _ingestionHttp.ExecuteCallAsync(call).RunNotAsync()); VerifyAdapterSend(Times.Once()); } @@ -59,7 +56,7 @@ public void IngestionHttpCancel() var call = PrepareServiceCall(); call.Cancel(); SetupAdapterSendResponse(HttpStatusCode.OK); - _ingestionHttp.ExecuteCallAsync(call).GetAwaiter().GetResult(); + _ingestionHttp.ExecuteCallAsync(call).RunNotAsync(); VerifyAdapterSend(Times.Never()); } diff --git a/Tests/Microsoft.AppCenter.Test.Windows/Ingestion/Http/NetworkStateTest.cs b/Tests/Microsoft.AppCenter.Test.Windows/Ingestion/Http/NetworkStateTest.cs index 125d86d74..62bc7dff5 100644 --- a/Tests/Microsoft.AppCenter.Test.Windows/Ingestion/Http/NetworkStateTest.cs +++ b/Tests/Microsoft.AppCenter.Test.Windows/Ingestion/Http/NetworkStateTest.cs @@ -51,7 +51,7 @@ public void NetworkStateIngestionOnline() var call = PrepareServiceCall(); SetupAdapterSendResponse(HttpStatusCode.OK); _networkState.IsConnected = true; - _networkStateIngestion.ExecuteCallAsync(call).GetAwaiter().GetResult(); + _networkStateIngestion.ExecuteCallAsync(call).RunNotAsync(); VerifyAdapterSend(Times.Once()); // No throw any exception diff --git a/Tests/Microsoft.AppCenter.Test.Windows/Ingestion/Http/RetryableTest.cs b/Tests/Microsoft.AppCenter.Test.Windows/Ingestion/Http/RetryableTest.cs index 430072574..d32725f1c 100644 --- a/Tests/Microsoft.AppCenter.Test.Windows/Ingestion/Http/RetryableTest.cs +++ b/Tests/Microsoft.AppCenter.Test.Windows/Ingestion/Http/RetryableTest.cs @@ -58,7 +58,7 @@ public void RetryableIngestionSuccess() { var call = PrepareServiceCall(); SetupAdapterSendResponse(HttpStatusCode.OK); - _retryableIngestion.ExecuteCallAsync(call).GetAwaiter().GetResult(); + _retryableIngestion.ExecuteCallAsync(call).RunNotAsync(); VerifyAdapterSend(Times.Once()); // No throw any exception @@ -82,7 +82,7 @@ public void RetryableIngestionRepeat1() _intervals[1].OnRequest += () => Assert.Fail(); // Run all chain not async - _retryableIngestion.ExecuteCallAsync(call).GetAwaiter().GetResult(); + _retryableIngestion.ExecuteCallAsync(call).RunNotAsync(); // Must be sent 2 times: 1 - main, 1 - repeat VerifyAdapterSend(Times.Exactly(2)); @@ -109,7 +109,7 @@ public void RetryableIngestionRepeat3() _intervals[2].OnRequest += () => VerifyAdapterSend(Times.Exactly(3)); // Run all chain not async - _retryableIngestion.ExecuteCallAsync(call).GetAwaiter().GetResult(); + _retryableIngestion.ExecuteCallAsync(call).RunNotAsync(); // Must be sent 4 times: 1 - main, 3 - repeat VerifyAdapterSend(Times.Exactly(4)); @@ -134,10 +134,7 @@ public void RetryableIngestionCancel() _intervals[2].OnRequest += () => Assert.Fail(); // Run all chain not async - Assert.ThrowsException(() => - { - _retryableIngestion.ExecuteCallAsync(call).GetAwaiter().GetResult(); - }); + Assert.ThrowsException(() => _retryableIngestion.ExecuteCallAsync(call).RunNotAsync()); // Must be sent 2 times: 1 - main, 1 - repeat VerifyAdapterSend(Times.Exactly(2)); @@ -151,10 +148,7 @@ public void RetryableIngestionException() { var call = PrepareServiceCall(); SetupAdapterSendResponse(HttpStatusCode.BadRequest); - Assert.ThrowsException(() => - { - _retryableIngestion.ExecuteCallAsync(call).GetAwaiter().GetResult(); - }); + Assert.ThrowsException(() => _retryableIngestion.ExecuteCallAsync(call).RunNotAsync()); VerifyAdapterSend(Times.Once()); } @@ -163,7 +157,7 @@ public void ServiceCallSuccessCallbackTest() { SetupAdapterSendResponse(HttpStatusCode.OK); var call = PrepareServiceCall(); - call.ExecuteAsync().GetAwaiter().GetResult(); + call.ExecuteAsync().RunNotAsync(); // No throw any exception } @@ -173,10 +167,7 @@ public void ServiceCallFailedCallbackTest() { SetupAdapterSendResponse(HttpStatusCode.NotFound); var call = PrepareServiceCall(); - Assert.ThrowsException(() => - { - call.ExecuteAsync().GetAwaiter().GetResult(); - }); + Assert.ThrowsException(() => { call.ExecuteAsync().RunNotAsync(); }); } /// diff --git a/Tests/Microsoft.AppCenter.Test.Windows/Ingestion/Http/ServiceCallTest.cs b/Tests/Microsoft.AppCenter.Test.Windows/Ingestion/Http/ServiceCallTest.cs index ef9291eb1..a201111e6 100644 --- a/Tests/Microsoft.AppCenter.Test.Windows/Ingestion/Http/ServiceCallTest.cs +++ b/Tests/Microsoft.AppCenter.Test.Windows/Ingestion/Http/ServiceCallTest.cs @@ -23,17 +23,14 @@ public void CheckSuccessCallback() { _ingestion.CallShouldSucceed = true; - _serviceCall.ExecuteAsync().GetAwaiter().GetResult(); + _serviceCall.ExecuteAsync().RunNotAsync(); } [TestMethod] public void CheckUnsuccessCallback() { _ingestion.CallShouldSucceed = false; - Assert.ThrowsException(() => - { - _serviceCall.ExecuteAsync().GetAwaiter().GetResult(); - }); + Assert.ThrowsException(() => _serviceCall.ExecuteAsync().RunNotAsync()); } } } diff --git a/Tests/Microsoft.AppCenter.Test.Windows/Ingestion/Models/CustomPropertiesLogTest.cs b/Tests/Microsoft.AppCenter.Test.Windows/Ingestion/Models/CustomPropertiesLogTest.cs index 90a6196d5..eaa7a2c5a 100644 --- a/Tests/Microsoft.AppCenter.Test.Windows/Ingestion/Models/CustomPropertiesLogTest.cs +++ b/Tests/Microsoft.AppCenter.Test.Windows/Ingestion/Models/CustomPropertiesLogTest.cs @@ -39,7 +39,7 @@ public void SaveCustomPropertiesLog() { var addedLog = new CustomPropertyLog { - Device = new DeviceInformationHelper().GetDeviceInformationAsync().GetAwaiter().GetResult(), + Device = new DeviceInformationHelper().GetDeviceInformationAsync().RunNotAsync(), Timestamp = DateTime.Now, Properties = new List { @@ -57,7 +57,7 @@ public void SaveCustomPropertiesLog() storage.DeleteLogs(StorageTestChannelName); storage.PutLog(StorageTestChannelName, addedLog); var retrievedLogs = new List(); - storage.GetLogsAsync(StorageTestChannelName, 1, retrievedLogs).GetAwaiter().GetResult(); + storage.GetLogsAsync(StorageTestChannelName, 1, retrievedLogs).RunNotAsync(); var retrievedLog = retrievedLogs[0] as CustomPropertyLog; foreach (var addedProperty in addedLog.Properties) diff --git a/Tests/Microsoft.AppCenter.Test.Windows/Ingestion/Models/StartServiceLogTest.cs b/Tests/Microsoft.AppCenter.Test.Windows/Ingestion/Models/StartServiceLogTest.cs index 79648c475..a15041643 100644 --- a/Tests/Microsoft.AppCenter.Test.Windows/Ingestion/Models/StartServiceLogTest.cs +++ b/Tests/Microsoft.AppCenter.Test.Windows/Ingestion/Models/StartServiceLogTest.cs @@ -55,7 +55,7 @@ public void SaveStartServiceLog() { var addedLog = new StartServiceLog { - Device = new DeviceInformationHelper().GetDeviceInformationAsync().GetAwaiter().GetResult(), + Device = new DeviceInformationHelper().GetDeviceInformationAsync().RunNotAsync(), Timestamp = DateTime.Now, Services = new List {"Service0", "Service1", "Service2"}, Sid = Guid.NewGuid() @@ -65,7 +65,7 @@ public void SaveStartServiceLog() storage.DeleteLogs(StorageTestChannelName); storage.PutLog(StorageTestChannelName, addedLog); var retrievedLogs = new List(); - storage.GetLogsAsync(StorageTestChannelName, 1, retrievedLogs).GetAwaiter().GetResult(); + storage.GetLogsAsync(StorageTestChannelName, 1, retrievedLogs).RunNotAsync(); var retrievedLog = retrievedLogs[0] as StartServiceLog; foreach (var serviceName in addedLog.Services) diff --git a/Tests/Microsoft.AppCenter.Test.Windows/Storage/FakeStorageTest.cs b/Tests/Microsoft.AppCenter.Test.Windows/Storage/FakeStorageTest.cs index faf083d05..efc15ed36 100644 --- a/Tests/Microsoft.AppCenter.Test.Windows/Storage/FakeStorageTest.cs +++ b/Tests/Microsoft.AppCenter.Test.Windows/Storage/FakeStorageTest.cs @@ -35,7 +35,7 @@ public void ShutdownTimeout() storage.PutLog(StorageTestChannelName, new TestLog()); #pragma warning restore 4014 - var result = storage.ShutdownAsync(TimeSpan.FromTicks(1)).GetAwaiter().GetResult(); + var result = storage.ShutdownAsync(TimeSpan.FromTicks(1)).RunNotAsync(); Assert.IsFalse(result); } @@ -58,7 +58,7 @@ public void ShutdownSucceed() storage.PutLog(StorageTestChannelName, new TestLog()); #pragma warning restore 4014 - var result = storage.ShutdownAsync(TimeSpan.FromSeconds(100)).GetAwaiter().GetResult(); + var result = storage.ShutdownAsync(TimeSpan.FromSeconds(100)).RunNotAsync(); Assert.IsTrue(result); } @@ -70,10 +70,10 @@ public void ShutdownPreventsNewTasks() { var mockConnection = new Mock(); var storage = new Microsoft.AppCenter.Storage.Storage(mockConnection.Object); - var result = storage.ShutdownAsync(TimeSpan.FromSeconds(10)).GetAwaiter().GetResult(); + var result = storage.ShutdownAsync(TimeSpan.FromSeconds(10)).RunNotAsync(); Assert.IsTrue(result); Assert.ThrowsException( - () => storage.GetLogsAsync(It.IsAny(), It.IsAny(), It.IsAny>()).GetAwaiter().GetResult()); + () => storage.GetLogsAsync(It.IsAny(), It.IsAny(), It.IsAny>()).RunNotAsync()); } /// @@ -89,7 +89,7 @@ public void GetLogsQueryError() var fakeStorage = new Microsoft.AppCenter.Storage.Storage(mockAdapter.Object); var logs = new List(); Assert.ThrowsException(() => - fakeStorage.GetLogsAsync(StorageTestChannelName, 1, logs).GetAwaiter().GetResult()); + fakeStorage.GetLogsAsync(StorageTestChannelName, 1, logs).RunNotAsync()); } /// @@ -110,10 +110,10 @@ public void StorageThrowsStorageException() .ThrowsAsync(new StorageException()); var fakeStorage = new Microsoft.AppCenter.Storage.Storage(mockAdapter.Object); - Assert.ThrowsException(() => fakeStorage.PutLog("channel_name", new TestLog()).GetAwaiter().GetResult()); - Assert.ThrowsException(() => fakeStorage.DeleteLogs("channel_name", string.Empty).GetAwaiter().GetResult()); - Assert.ThrowsException(() => fakeStorage.CountLogsAsync("channel_name").GetAwaiter().GetResult()); - Assert.ThrowsException(() => fakeStorage.GetLogsAsync("channel_name", 1, new List()).GetAwaiter().GetResult()); + Assert.ThrowsException(() => fakeStorage.PutLog("channel_name", new TestLog()).RunNotAsync()); + Assert.ThrowsException(() => fakeStorage.DeleteLogs("channel_name", string.Empty).RunNotAsync()); + Assert.ThrowsException(() => fakeStorage.CountLogsAsync("channel_name").RunNotAsync()); + Assert.ThrowsException(() => fakeStorage.GetLogsAsync("channel_name", 1, new List()).RunNotAsync()); } } } diff --git a/Tests/Microsoft.AppCenter.Test.Windows/Storage/StorageTest.cs b/Tests/Microsoft.AppCenter.Test.Windows/Storage/StorageTest.cs index 5b8c44ed0..593b7f836 100644 --- a/Tests/Microsoft.AppCenter.Test.Windows/Storage/StorageTest.cs +++ b/Tests/Microsoft.AppCenter.Test.Windows/Storage/StorageTest.cs @@ -24,7 +24,7 @@ public void InitializeStorageTest() [TestMethod] public void CountEmptyStorage() { - var count = _storage.CountLogsAsync(StorageTestChannelName).GetAwaiter().GetResult(); + var count = _storage.CountLogsAsync(StorageTestChannelName).RunNotAsync(); Assert.AreEqual(0, count); } @@ -36,7 +36,7 @@ public void CountNonemptyStorage() { var numLogsToAdd = 5; PutNLogs(numLogsToAdd); - var count = _storage.CountLogsAsync(StorageTestChannelName).GetAwaiter().GetResult(); + var count = _storage.CountLogsAsync(StorageTestChannelName).RunNotAsync(); Assert.AreEqual(numLogsToAdd, count); } @@ -49,7 +49,7 @@ public void PutOneLog() var addedLog = TestLog.CreateTestLog(); _storage.PutLog(StorageTestChannelName, addedLog); var retrievedLogs = new List(); - _storage.GetLogsAsync(StorageTestChannelName, 1, retrievedLogs).GetAwaiter().GetResult(); + _storage.GetLogsAsync(StorageTestChannelName, 1, retrievedLogs).RunNotAsync(); var retrievedLog = retrievedLogs[0]; Assert.AreEqual(addedLog, retrievedLog); } @@ -62,7 +62,7 @@ public void DeleteLogsNoBatchId() { PutNLogs(5); _storage.DeleteLogs(StorageTestChannelName); - var count = _storage.CountLogsAsync(StorageTestChannelName).GetAwaiter().GetResult(); + var count = _storage.CountLogsAsync(StorageTestChannelName).RunNotAsync(); Assert.AreEqual(0, count); } @@ -76,9 +76,9 @@ public void DeleteLogsWithBatchId() var limit = 3; var addedLogs = PutNLogs(numLogsToAdd); var retrievedLogs = new List(); - var batchId = _storage.GetLogsAsync(StorageTestChannelName, limit, retrievedLogs).GetAwaiter().GetResult(); + var batchId = _storage.GetLogsAsync(StorageTestChannelName, limit, retrievedLogs).RunNotAsync(); _storage.DeleteLogs(StorageTestChannelName, batchId); - var numLogsRemaining = _storage.CountLogsAsync(StorageTestChannelName).GetAwaiter().GetResult(); + var numLogsRemaining = _storage.CountLogsAsync(StorageTestChannelName).RunNotAsync(); Assert.AreEqual(numLogsToAdd - retrievedLogs.Count, numLogsRemaining); } @@ -92,7 +92,7 @@ public void GetLogsExactLimit() var limit = numLogsToAdd; var addedLogs = PutNLogs(numLogsToAdd); var retrievedLogs = new List(); - _storage.GetLogsAsync(StorageTestChannelName, limit, retrievedLogs).GetAwaiter().GetResult(); + _storage.GetLogsAsync(StorageTestChannelName, limit, retrievedLogs).RunNotAsync(); CollectionAssert.AreEquivalent(addedLogs, retrievedLogs); } @@ -106,7 +106,7 @@ public void GetLogsLowLimit() var limit = 3; var addedLogs = PutNLogs(numLogsToAdd); var retrievedLogs = new List(); - _storage.GetLogsAsync(StorageTestChannelName, limit, retrievedLogs).GetAwaiter().GetResult(); + _storage.GetLogsAsync(StorageTestChannelName, limit, retrievedLogs).RunNotAsync(); Assert.AreEqual(limit, retrievedLogs.Count); CollectionAssert.IsSubsetOf(retrievedLogs, addedLogs); } @@ -121,7 +121,7 @@ public void GetLogsHighLimit() var limit = 7; var addedLogs = PutNLogs(numLogsToAdd); var retrievedLogs = new List(); - _storage.GetLogsAsync(StorageTestChannelName, limit, retrievedLogs).GetAwaiter().GetResult(); + _storage.GetLogsAsync(StorageTestChannelName, limit, retrievedLogs).RunNotAsync(); CollectionAssert.AreEquivalent(retrievedLogs, addedLogs); } @@ -135,7 +135,7 @@ public void GetLogsHasBatchId() var limit = numLogsToAdd; var addedLogs = PutNLogs(numLogsToAdd); var retrievedLogs = new List(); - var batchId = _storage.GetLogsAsync(StorageTestChannelName, limit, retrievedLogs).GetAwaiter().GetResult(); + var batchId = _storage.GetLogsAsync(StorageTestChannelName, limit, retrievedLogs).RunNotAsync(); Assert.IsNotNull(batchId); } @@ -149,7 +149,7 @@ public void GetNoLogsHasNoBatchId() var limit = numLogsToAdd; var addedLogs = PutNLogs(numLogsToAdd); var retrievedLogs = new List(); - var batchId = _storage.GetLogsAsync(StorageTestChannelName, limit, retrievedLogs).GetAwaiter().GetResult(); + var batchId = _storage.GetLogsAsync(StorageTestChannelName, limit, retrievedLogs).RunNotAsync(); Assert.IsNull(batchId); } @@ -164,8 +164,8 @@ public void GetDuplicateLogs() var addedLogs = PutNLogs(numLogsToAdd); var retrievedLogsFirstTry = new List(); var retrievedLogsSecondTry = new List(); - _storage.GetLogsAsync(StorageTestChannelName, limit, retrievedLogsFirstTry).GetAwaiter().GetResult(); - _storage.GetLogsAsync(StorageTestChannelName, limit, retrievedLogsSecondTry).GetAwaiter().GetResult(); + _storage.GetLogsAsync(StorageTestChannelName, limit, retrievedLogsFirstTry).RunNotAsync(); + _storage.GetLogsAsync(StorageTestChannelName, limit, retrievedLogsSecondTry).RunNotAsync(); CollectionAssert.AreEquivalent(addedLogs, retrievedLogsFirstTry); Assert.AreEqual(0, retrievedLogsSecondTry.Count); } @@ -179,7 +179,7 @@ public void GetLogsFromChannelWithSimilarNames() var fakeChannelName = StorageTestChannelName.Substring(0, StorageTestChannelName.Length - 1); _storage.PutLog(StorageTestChannelName, TestLog.CreateTestLog()); var retrievedLogs = new List(); - var batchId = _storage.GetLogsAsync(fakeChannelName, 1, retrievedLogs).GetAwaiter().GetResult(); + var batchId = _storage.GetLogsAsync(fakeChannelName, 1, retrievedLogs).RunNotAsync(); Assert.IsNull(batchId); } @@ -194,9 +194,9 @@ public void ClearPendingState() var addedLogs = PutNLogs(numLogsToAdd); var retrievedLogsFirstTry = new List(); var retrievedLogsSecondTry = new List(); - _storage.GetLogsAsync(StorageTestChannelName, limit, retrievedLogsFirstTry).GetAwaiter().GetResult(); + _storage.GetLogsAsync(StorageTestChannelName, limit, retrievedLogsFirstTry).RunNotAsync(); _storage.ClearPendingLogState(StorageTestChannelName); - _storage.GetLogsAsync(StorageTestChannelName, limit, retrievedLogsSecondTry).GetAwaiter().GetResult(); + _storage.GetLogsAsync(StorageTestChannelName, limit, retrievedLogsSecondTry).RunNotAsync(); CollectionAssert.AreEquivalent(addedLogs, retrievedLogsFirstTry); CollectionAssert.AreEquivalent(addedLogs, retrievedLogsSecondTry); } @@ -212,11 +212,11 @@ public void FailToGetALog() // Perform an arbitrary operation and wait on it to complete so that database is free when invalid log // is inserted. - _storage.CountLogsAsync(StorageTestChannelName).GetAwaiter().GetResult(); + _storage.CountLogsAsync(StorageTestChannelName).RunNotAsync(); connection.Insert(invalidLogEntry); var logs = new List(); - var batchId = _storage.GetLogsAsync(StorageTestChannelName, 4, logs).GetAwaiter().GetResult(); - var count = _storage.CountLogsAsync(StorageTestChannelName).GetAwaiter().GetResult(); + var batchId = _storage.GetLogsAsync(StorageTestChannelName, 4, logs).RunNotAsync(); + var count = _storage.CountLogsAsync(StorageTestChannelName).RunNotAsync(); Assert.IsNull(batchId); Assert.AreEqual(0, logs.Count); Assert.AreEqual(0, count); diff --git a/Tests/Microsoft.AppCenter.Test.Windows/TaskExtension.cs b/Tests/Microsoft.AppCenter.Test.Windows/TaskExtension.cs index 7cfde5778..0b1732ee4 100644 --- a/Tests/Microsoft.AppCenter.Test.Windows/TaskExtension.cs +++ b/Tests/Microsoft.AppCenter.Test.Windows/TaskExtension.cs @@ -6,6 +6,15 @@ namespace Microsoft.AppCenter.Test { public static class TaskExtension { + public static T RunNotAsync(this Task @this) + { + return @this.GetAwaiter().GetResult(); + } + public static void RunNotAsync(this Task @this) + { + @this.GetAwaiter().GetResult(); + } + public static Task GetCompletedTask() { var completedTask = Task.Delay(0); From ada7d5529b9b25765bab80583ba9793787f95446 Mon Sep 17 00:00:00 2001 From: snrnats Date: Sat, 14 Apr 2018 11:04:21 +0300 Subject: [PATCH 44/46] Removed unused 'using' --- .../Microsoft.AppCenter.Windows.Shared/Storage/Storage.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/SDK/AppCenter/Microsoft.AppCenter.Windows.Shared/Storage/Storage.cs b/SDK/AppCenter/Microsoft.AppCenter.Windows.Shared/Storage/Storage.cs index 4ca9a9d89..03dfaf227 100644 --- a/SDK/AppCenter/Microsoft.AppCenter.Windows.Shared/Storage/Storage.cs +++ b/SDK/AppCenter/Microsoft.AppCenter.Windows.Shared/Storage/Storage.cs @@ -6,7 +6,6 @@ using System.Threading.Tasks; using Microsoft.AppCenter.Ingestion.Models; using Microsoft.AppCenter.Ingestion.Models.Serialization; -using Microsoft.AppCenter.Utils; using Newtonsoft.Json; using SQLite; From 7478fca5efcd2cf47eae969366ae6875fde053d5 Mon Sep 17 00:00:00 2001 From: snrnats Date: Sat, 14 Apr 2018 11:49:09 +0300 Subject: [PATCH 45/46] Use Mock.Returns() with faulted task until Mock.ThrowsAsync is fixed. --- .../Storage/FakeStorageTest.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Tests/Microsoft.AppCenter.Test.Windows/Storage/FakeStorageTest.cs b/Tests/Microsoft.AppCenter.Test.Windows/Storage/FakeStorageTest.cs index efc15ed36..9fae60f9d 100644 --- a/Tests/Microsoft.AppCenter.Test.Windows/Storage/FakeStorageTest.cs +++ b/Tests/Microsoft.AppCenter.Test.Windows/Storage/FakeStorageTest.cs @@ -85,7 +85,7 @@ public void GetLogsQueryError() var mockAdapter = new Mock(); mockAdapter.Setup( a => a.GetAsync(It.IsAny(), It.IsAny())) - .ThrowsAsync(new StorageException()); + .Returns(TaskExtension.GetFaultedTask>(new StorageException())); var fakeStorage = new Microsoft.AppCenter.Storage.Storage(mockAdapter.Object); var logs = new List(); Assert.ThrowsException(() => @@ -101,13 +101,13 @@ public void StorageThrowsStorageException() var mockAdapter = new Mock(); mockAdapter.Setup( a => a.GetAsync(It.IsAny(), It.IsAny())) - .ThrowsAsync(new StorageException()); + .Returns(TaskExtension.GetFaultedTask>(new StorageException())); mockAdapter.Setup(c => c.InsertAsync(It.IsAny())) - .ThrowsAsync(new StorageException()); + .Returns(TaskExtension.GetFaultedTask(new StorageException())); mockAdapter.Setup(c => c.DeleteAsync(It.IsAny>>())) - .ThrowsAsync(new StorageException()); + .Returns(TaskExtension.GetFaultedTask(new StorageException())); mockAdapter.Setup(c => c.CountAsync(It.IsAny>>())) - .ThrowsAsync(new StorageException()); + .Returns(TaskExtension.GetFaultedTask(new StorageException())); var fakeStorage = new Microsoft.AppCenter.Storage.Storage(mockAdapter.Object); Assert.ThrowsException(() => fakeStorage.PutLog("channel_name", new TestLog()).RunNotAsync()); From 7c685c58e8a047cfae993f4d6bdf854156dd1e52 Mon Sep 17 00:00:00 2001 From: Guillaume Perrot Date: Wed, 18 Apr 2018 17:57:16 -0700 Subject: [PATCH 46/46] Update native sdks --- .../Properties/AndroidManifest.xml | 2 +- .../Properties/AssemblyInfo.cs | 4 ++-- .../Contoso.Forms.Puppet.Droid.csproj | 4 +++- .../Properties/AndroidManifest.xml | 13 ++++++++----- .../Properties/AssemblyInfo.cs | 4 ++-- .../Resources/drawable/ic_appcenter_logo.xml | 12 ++++++++++++ .../Resources/values/colors.xml | 4 ++++ .../Contoso.Forms.Puppet.UWP/Package.appxmanifest | 2 +- .../Properties/AssemblyInfo.cs | 2 +- .../Contoso.Forms.Puppet.iOS/Info.plist | 4 ++-- .../Contoso.Forms.Puppet/Properties/AssemblyInfo.cs | 4 ++-- Apps/Contoso.UWP.Puppet/Package.appxmanifest | 2 +- Apps/Contoso.UWP.Puppet/Properties/AssemblyInfo.cs | 2 +- Apps/Contoso.WPF.Puppet/Properties/AssemblyInfo.cs | 4 ++-- .../Properties/AssemblyInfo.cs | 4 ++-- Apps/Contoso.iOS.Puppet/Info.plist | 4 ++-- .../Properties/AssemblyInfo.cs | 4 ++-- .../Properties/AssemblyInfo.cs | 4 ++-- .../Microsoft.AppCenter.Shared/WrapperSdk.cs | 2 +- .../Properties/AssemblyInfo.cs | 4 ++-- .../Properties/AssemblyInfo.cs | 4 ++-- .../Properties/AssemblyInfo.cs | 4 ++-- .../Properties/AssemblyInfo.cs | 4 ++-- .../Microsoft.AppCenter/Microsoft.AppCenter.csproj | 4 ++-- .../Properties/AssemblyInfo.cs | 4 ++-- .../Properties/AssemblyInfo.cs | 4 ++-- .../Properties/AssemblyInfo.cs | 4 ++-- .../Properties/AssemblyInfo.cs | 4 ++-- .../Properties/AssemblyInfo.cs | 4 ++-- .../Properties/AssemblyInfo.cs | 4 ++-- .../Microsoft.AppCenter.Analytics.csproj | 4 ++-- .../Properties/AssemblyInfo.cs | 4 ++-- .../Properties/AssemblyInfo.cs | 4 ++-- .../Properties/AssemblyInfo.cs | 4 ++-- .../Properties/AssemblyInfo.cs | 4 ++-- .../Properties/AssemblyInfo.cs | 4 ++-- .../Properties/AssemblyInfo.cs | 4 ++-- .../Microsoft.AppCenter.Crashes.csproj | 4 ++-- .../Properties/AssemblyInfo.cs | 4 ++-- .../Properties/AssemblyInfo.cs | 4 ++-- .../Properties/AssemblyInfo.cs | 4 ++-- .../Properties/AssemblyInfo.cs | 4 ++-- .../Microsoft.AppCenter.Distribute.csproj | 4 ++-- .../Properties/AssemblyInfo.cs | 4 ++-- .../Properties/AssemblyInfo.cs | 4 ++-- .../Properties/AssemblyInfo.cs | 2 +- .../Properties/AssemblyInfo.cs | 4 ++-- .../Properties/AssemblyInfo.cs | 4 ++-- .../Microsoft.AppCenter.Push.csproj | 4 ++-- .../Properties/AssemblyInfo.cs | 4 ++-- .../Properties/AssemblyInfo.cs | 2 +- .../Microsoft.AppCenter.Rum.csproj | 4 ++-- Tests/Contoso.Forms.Test/Properties/AssemblyInfo.cs | 4 ++-- Tests/Droid/Properties/AndroidManifest.xml | 2 +- Tests/Droid/Properties/AssemblyInfo.cs | 4 ++-- .../Properties/AssemblyInfo.cs | 4 ++-- .../Properties/AssemblyInfo.cs | 4 ++-- .../Properties/AssemblyInfo.cs | 4 ++-- .../Properties/AssemblyInfo.cs | 2 +- .../Properties/AssemblyInfo.cs | 2 +- .../Package.appxmanifest | 2 +- .../Properties/AssemblyInfo.cs | 2 +- .../Properties/AssemblyInfo.cs | 4 ++-- .../Properties/AssemblyInfo.cs | 2 +- Tests/iOS/Info.plist | 4 ++-- scripts/configuration/ac-build-config.xml | 6 +++--- 66 files changed, 138 insertions(+), 117 deletions(-) create mode 100644 Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet.Droid/Resources/drawable/ic_appcenter_logo.xml create mode 100644 Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet.Droid/Resources/values/colors.xml diff --git a/Apps/Contoso.Android.Puppet/Properties/AndroidManifest.xml b/Apps/Contoso.Android.Puppet/Properties/AndroidManifest.xml index 7b5b10b44..79cc647d5 100644 --- a/Apps/Contoso.Android.Puppet/Properties/AndroidManifest.xml +++ b/Apps/Contoso.Android.Puppet/Properties/AndroidManifest.xml @@ -1,5 +1,5 @@ - + diff --git a/Apps/Contoso.Android.Puppet/Properties/AssemblyInfo.cs b/Apps/Contoso.Android.Puppet/Properties/AssemblyInfo.cs index 54ce2346b..5256f5816 100644 --- a/Apps/Contoso.Android.Puppet/Properties/AssemblyInfo.cs +++ b/Apps/Contoso.Android.Puppet/Properties/AssemblyInfo.cs @@ -25,5 +25,5 @@ // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("0.0.0.0")] -[assembly: AssemblyFileVersion("1.5.1.0")] -[assembly: AssemblyInformationalVersion("1.5.1-SNAPSHOT")] +[assembly: AssemblyFileVersion("1.6.0.0")] +[assembly: AssemblyInformationalVersion("1.6.0-SNAPSHOT")] diff --git a/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet.Droid/Contoso.Forms.Puppet.Droid.csproj b/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet.Droid/Contoso.Forms.Puppet.Droid.csproj index 389f82c2e..cc4860ae9 100644 --- a/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet.Droid/Contoso.Forms.Puppet.Droid.csproj +++ b/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet.Droid/Contoso.Forms.Puppet.Droid.csproj @@ -10,7 +10,7 @@ Library Contoso.Forms.Puppet.Droid Contoso.Forms.Puppet.Droid - v8.0 + v8.1 True Resources\Resource.designer.cs Resource @@ -155,6 +155,8 @@ + + diff --git a/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet.Droid/Properties/AndroidManifest.xml b/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet.Droid/Properties/AndroidManifest.xml index f6a19c7fe..e75477593 100644 --- a/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet.Droid/Properties/AndroidManifest.xml +++ b/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet.Droid/Properties/AndroidManifest.xml @@ -1,7 +1,10 @@ - - - - - + + + + + + + + \ No newline at end of file diff --git a/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet.Droid/Properties/AssemblyInfo.cs b/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet.Droid/Properties/AssemblyInfo.cs index 9ed9d6bc1..317304a17 100644 --- a/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet.Droid/Properties/AssemblyInfo.cs +++ b/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet.Droid/Properties/AssemblyInfo.cs @@ -19,8 +19,8 @@ // and "{Major}.{Minor}.{Build}.*" will update just the revision. [assembly: AssemblyVersion("0.0.0.0")] -[assembly: AssemblyFileVersion("1.5.1.0")] -[assembly: AssemblyInformationalVersion("1.5.1-SNAPSHOT")] +[assembly: AssemblyFileVersion("1.6.0.0")] +[assembly: AssemblyInformationalVersion("1.6.0-SNAPSHOT")] // The following attributes are used to specify the signing key for the assembly, // if desired. See the Mono documentation for more information about signing. diff --git a/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet.Droid/Resources/drawable/ic_appcenter_logo.xml b/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet.Droid/Resources/drawable/ic_appcenter_logo.xml new file mode 100644 index 000000000..71534290d --- /dev/null +++ b/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet.Droid/Resources/drawable/ic_appcenter_logo.xml @@ -0,0 +1,12 @@ + + + + diff --git a/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet.Droid/Resources/values/colors.xml b/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet.Droid/Resources/values/colors.xml new file mode 100644 index 000000000..36f3476a1 --- /dev/null +++ b/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet.Droid/Resources/values/colors.xml @@ -0,0 +1,4 @@ + + + #CB2E62 + \ No newline at end of file diff --git a/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet.UWP/Package.appxmanifest b/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet.UWP/Package.appxmanifest index a7759c41f..46f3cd33c 100644 --- a/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet.UWP/Package.appxmanifest +++ b/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet.UWP/Package.appxmanifest @@ -1,6 +1,6 @@ - + AppCenter-Contoso.Forms.Puppet.UWP diff --git a/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet.UWP/Properties/AssemblyInfo.cs b/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet.UWP/Properties/AssemblyInfo.cs index 1aa371c9c..085dac125 100644 --- a/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet.UWP/Properties/AssemblyInfo.cs +++ b/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet.UWP/Properties/AssemblyInfo.cs @@ -24,5 +24,5 @@ // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("0.0.0.0")] -[assembly: AssemblyFileVersion("1.5.1.0")] +[assembly: AssemblyFileVersion("1.6.0.0")] [assembly: ComVisible(false)] diff --git a/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet.iOS/Info.plist b/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet.iOS/Info.plist index 11f9d5c57..988b61ac2 100644 --- a/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet.iOS/Info.plist +++ b/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet.iOS/Info.plist @@ -5,9 +5,9 @@ CFBundleIdentifier com.microsoft.appcenter.xamarin.forms.puppet CFBundleShortVersionString - 1.5.1 + 1.6.0 CFBundleVersion - 1.5.1 + 1.6.0 LSRequiresIPhoneOS MinimumOSVersion diff --git a/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet/Properties/AssemblyInfo.cs b/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet/Properties/AssemblyInfo.cs index ab59978ae..3db7e5a6e 100644 --- a/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet/Properties/AssemblyInfo.cs +++ b/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet/Properties/AssemblyInfo.cs @@ -17,8 +17,8 @@ // and "{Major}.{Minor}.{Build}.*" will update just the revision. [assembly: AssemblyVersion("0.0.0.0")] -[assembly: AssemblyFileVersion("1.5.1.0")] -[assembly: AssemblyInformationalVersion("1.5.1-SNAPSHOT")] +[assembly: AssemblyFileVersion("1.6.0.0")] +[assembly: AssemblyInformationalVersion("1.6.0-SNAPSHOT")] // The following attributes are used to specify the signing key for the assembly, // if desired. See the Mono documentation for more information about signing. diff --git a/Apps/Contoso.UWP.Puppet/Package.appxmanifest b/Apps/Contoso.UWP.Puppet/Package.appxmanifest index 02c1f6ea9..34dd18d7c 100644 --- a/Apps/Contoso.UWP.Puppet/Package.appxmanifest +++ b/Apps/Contoso.UWP.Puppet/Package.appxmanifest @@ -1,6 +1,6 @@ - + AppCenter-Contoso.UWP.Puppet diff --git a/Apps/Contoso.UWP.Puppet/Properties/AssemblyInfo.cs b/Apps/Contoso.UWP.Puppet/Properties/AssemblyInfo.cs index 3e874b4b0..e49fc60b0 100644 --- a/Apps/Contoso.UWP.Puppet/Properties/AssemblyInfo.cs +++ b/Apps/Contoso.UWP.Puppet/Properties/AssemblyInfo.cs @@ -24,5 +24,5 @@ // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("0.0.0.0")] -[assembly: AssemblyFileVersion("1.5.1.0")] +[assembly: AssemblyFileVersion("1.6.0.0")] [assembly: ComVisible(false)] \ No newline at end of file diff --git a/Apps/Contoso.WPF.Puppet/Properties/AssemblyInfo.cs b/Apps/Contoso.WPF.Puppet/Properties/AssemblyInfo.cs index 9c17a92c0..70d59da24 100644 --- a/Apps/Contoso.WPF.Puppet/Properties/AssemblyInfo.cs +++ b/Apps/Contoso.WPF.Puppet/Properties/AssemblyInfo.cs @@ -27,5 +27,5 @@ // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("0.0.0.0")] -[assembly: AssemblyFileVersion("1.5.1.0")] -[assembly: AssemblyInformationalVersion("1.5.1-SNAPSHOT")] +[assembly: AssemblyFileVersion("1.6.0.0")] +[assembly: AssemblyInformationalVersion("1.6.0-SNAPSHOT")] diff --git a/Apps/Contoso.WinForms.Puppet/Properties/AssemblyInfo.cs b/Apps/Contoso.WinForms.Puppet/Properties/AssemblyInfo.cs index 0006e1170..6345d5ed9 100644 --- a/Apps/Contoso.WinForms.Puppet/Properties/AssemblyInfo.cs +++ b/Apps/Contoso.WinForms.Puppet/Properties/AssemblyInfo.cs @@ -25,5 +25,5 @@ // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("0.0.0.0")] -[assembly: AssemblyFileVersion("1.5.1.0")] -[assembly: AssemblyInformationalVersion("1.5.1-SNAPSHOT")] +[assembly: AssemblyFileVersion("1.6.0.0")] +[assembly: AssemblyInformationalVersion("1.6.0-SNAPSHOT")] diff --git a/Apps/Contoso.iOS.Puppet/Info.plist b/Apps/Contoso.iOS.Puppet/Info.plist index 489ebaaed..c6d7ebf95 100644 --- a/Apps/Contoso.iOS.Puppet/Info.plist +++ b/Apps/Contoso.iOS.Puppet/Info.plist @@ -7,9 +7,9 @@ CFBundleIdentifier com.microsoft.appcenter.xamarin.puppet CFBundleShortVersionString - 1.5.1 + 1.6.0 CFBundleVersion - 1.5.1 + 1.6.0 LSRequiresIPhoneOS MinimumOSVersion diff --git a/SDK/AppCenter/Microsoft.AppCenter.Android.Bindings/Properties/AssemblyInfo.cs b/SDK/AppCenter/Microsoft.AppCenter.Android.Bindings/Properties/AssemblyInfo.cs index ee844a7d5..b63ae6c68 100644 --- a/SDK/AppCenter/Microsoft.AppCenter.Android.Bindings/Properties/AssemblyInfo.cs +++ b/SDK/AppCenter/Microsoft.AppCenter.Android.Bindings/Properties/AssemblyInfo.cs @@ -26,5 +26,5 @@ // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("0.0.0.0")] -[assembly: AssemblyFileVersion("1.5.1.0")] -[assembly: AssemblyInformationalVersion("1.5.1-SNAPSHOT")] +[assembly: AssemblyFileVersion("1.6.0.0")] +[assembly: AssemblyInformationalVersion("1.6.0-SNAPSHOT")] diff --git a/SDK/AppCenter/Microsoft.AppCenter.Android/Properties/AssemblyInfo.cs b/SDK/AppCenter/Microsoft.AppCenter.Android/Properties/AssemblyInfo.cs index c47365b4a..caed38b12 100644 --- a/SDK/AppCenter/Microsoft.AppCenter.Android/Properties/AssemblyInfo.cs +++ b/SDK/AppCenter/Microsoft.AppCenter.Android/Properties/AssemblyInfo.cs @@ -25,5 +25,5 @@ // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("0.0.0.0")] -[assembly: AssemblyFileVersion("1.5.1.0")] -[assembly: AssemblyInformationalVersion("1.5.1-SNAPSHOT")] +[assembly: AssemblyFileVersion("1.6.0.0")] +[assembly: AssemblyInformationalVersion("1.6.0-SNAPSHOT")] diff --git a/SDK/AppCenter/Microsoft.AppCenter.Shared/WrapperSdk.cs b/SDK/AppCenter/Microsoft.AppCenter.Shared/WrapperSdk.cs index 4e4f673d3..cb061f33e 100644 --- a/SDK/AppCenter/Microsoft.AppCenter.Shared/WrapperSdk.cs +++ b/SDK/AppCenter/Microsoft.AppCenter.Shared/WrapperSdk.cs @@ -5,6 +5,6 @@ public static class WrapperSdk public const string Name = "appcenter.xamarin"; /* We can't use reflection for assemblyInformationalVersion on iOS with "Link All" optimization. */ - internal const string Version = "1.5.1-SNAPSHOT"; + internal const string Version = "1.6.0-SNAPSHOT"; } } diff --git a/SDK/AppCenter/Microsoft.AppCenter.UWP/Properties/AssemblyInfo.cs b/SDK/AppCenter/Microsoft.AppCenter.UWP/Properties/AssemblyInfo.cs index 73fac4b5f..c21a85a6b 100644 --- a/SDK/AppCenter/Microsoft.AppCenter.UWP/Properties/AssemblyInfo.cs +++ b/SDK/AppCenter/Microsoft.AppCenter.UWP/Properties/AssemblyInfo.cs @@ -25,7 +25,7 @@ // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("0.0.0.0")] -[assembly: AssemblyFileVersion("1.5.1.0")] -[assembly: AssemblyInformationalVersion("1.5.1-SNAPSHOT")] +[assembly: AssemblyFileVersion("1.6.0.0")] +[assembly: AssemblyInformationalVersion("1.6.0-SNAPSHOT")] [assembly: ComVisible(false)] [assembly: InternalsVisibleTo("Microsoft.AppCenter.Test.UWP")] \ No newline at end of file diff --git a/SDK/AppCenter/Microsoft.AppCenter.WindowsDesktop/Properties/AssemblyInfo.cs b/SDK/AppCenter/Microsoft.AppCenter.WindowsDesktop/Properties/AssemblyInfo.cs index 613b8805e..1c60493be 100644 --- a/SDK/AppCenter/Microsoft.AppCenter.WindowsDesktop/Properties/AssemblyInfo.cs +++ b/SDK/AppCenter/Microsoft.AppCenter.WindowsDesktop/Properties/AssemblyInfo.cs @@ -25,6 +25,6 @@ // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("0.0.0.0")] -[assembly: AssemblyFileVersion("1.5.1.0")] -[assembly: AssemblyInformationalVersion("1.5.1-SNAPSHOT")] +[assembly: AssemblyFileVersion("1.6.0.0")] +[assembly: AssemblyInformationalVersion("1.6.0-SNAPSHOT")] [assembly: InternalsVisibleTo("Microsoft.AppCenter.Test.WindowsDesktop")] diff --git a/SDK/AppCenter/Microsoft.AppCenter.iOS.Bindings/Properties/AssemblyInfo.cs b/SDK/AppCenter/Microsoft.AppCenter.iOS.Bindings/Properties/AssemblyInfo.cs index 45d1255a4..9ee8f395b 100644 --- a/SDK/AppCenter/Microsoft.AppCenter.iOS.Bindings/Properties/AssemblyInfo.cs +++ b/SDK/AppCenter/Microsoft.AppCenter.iOS.Bindings/Properties/AssemblyInfo.cs @@ -31,5 +31,5 @@ // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("0.0.0.0")] -[assembly: AssemblyFileVersion("1.5.1.0")] -[assembly: AssemblyInformationalVersion("1.5.1-SNAPSHOT")] +[assembly: AssemblyFileVersion("1.6.0.0")] +[assembly: AssemblyInformationalVersion("1.6.0-SNAPSHOT")] diff --git a/SDK/AppCenter/Microsoft.AppCenter.iOS/Properties/AssemblyInfo.cs b/SDK/AppCenter/Microsoft.AppCenter.iOS/Properties/AssemblyInfo.cs index 257b70534..f932f0093 100644 --- a/SDK/AppCenter/Microsoft.AppCenter.iOS/Properties/AssemblyInfo.cs +++ b/SDK/AppCenter/Microsoft.AppCenter.iOS/Properties/AssemblyInfo.cs @@ -23,5 +23,5 @@ // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("0.0.0.0")] -[assembly: AssemblyFileVersion("1.5.1.0")] -[assembly: AssemblyInformationalVersion("1.5.1-SNAPSHOT")] +[assembly: AssemblyFileVersion("1.6.0.0")] +[assembly: AssemblyInformationalVersion("1.6.0-SNAPSHOT")] diff --git a/SDK/AppCenter/Microsoft.AppCenter/Microsoft.AppCenter.csproj b/SDK/AppCenter/Microsoft.AppCenter/Microsoft.AppCenter.csproj index 0754c44d6..097e47c84 100644 --- a/SDK/AppCenter/Microsoft.AppCenter/Microsoft.AppCenter.csproj +++ b/SDK/AppCenter/Microsoft.AppCenter/Microsoft.AppCenter.csproj @@ -7,9 +7,9 @@ Microsoft Corp. All rights reserved. Microsoft.AppCenter.Core Microsoft Corporation - 1.5.1-SNAPSHOT + 1.6.0-SNAPSHOT 0.0.0.0 - 1.5.1.0 + 1.6.0.0 Microsoft.AppCenter.Core diff --git a/SDK/AppCenterAnalytics/Microsoft.AppCenter.Analytics.Android.Bindings/Properties/AssemblyInfo.cs b/SDK/AppCenterAnalytics/Microsoft.AppCenter.Analytics.Android.Bindings/Properties/AssemblyInfo.cs index 19d6898aa..0a7aa0fa6 100644 --- a/SDK/AppCenterAnalytics/Microsoft.AppCenter.Analytics.Android.Bindings/Properties/AssemblyInfo.cs +++ b/SDK/AppCenterAnalytics/Microsoft.AppCenter.Analytics.Android.Bindings/Properties/AssemblyInfo.cs @@ -18,8 +18,8 @@ // and "{Major}.{Minor}.{Build}.*" will update just the revision. [assembly: AssemblyVersion("0.0.0.0")] -[assembly: AssemblyFileVersion("1.5.1.0")] -[assembly: AssemblyInformationalVersion("1.5.1-SNAPSHOT")] +[assembly: AssemblyFileVersion("1.6.0.0")] +[assembly: AssemblyInformationalVersion("1.6.0-SNAPSHOT")] // The following attributes are used to specify the signing key for the assembly, // if desired. See the Mono documentation for more information about signing. diff --git a/SDK/AppCenterAnalytics/Microsoft.AppCenter.Analytics.Android/Properties/AssemblyInfo.cs b/SDK/AppCenterAnalytics/Microsoft.AppCenter.Analytics.Android/Properties/AssemblyInfo.cs index e20766948..4e3f44bac 100644 --- a/SDK/AppCenterAnalytics/Microsoft.AppCenter.Analytics.Android/Properties/AssemblyInfo.cs +++ b/SDK/AppCenterAnalytics/Microsoft.AppCenter.Analytics.Android/Properties/AssemblyInfo.cs @@ -25,5 +25,5 @@ // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("0.0.0.0")] -[assembly: AssemblyFileVersion("1.5.1.0")] -[assembly: AssemblyInformationalVersion("1.5.1-SNAPSHOT")] +[assembly: AssemblyFileVersion("1.6.0.0")] +[assembly: AssemblyInformationalVersion("1.6.0-SNAPSHOT")] diff --git a/SDK/AppCenterAnalytics/Microsoft.AppCenter.Analytics.UWP/Properties/AssemblyInfo.cs b/SDK/AppCenterAnalytics/Microsoft.AppCenter.Analytics.UWP/Properties/AssemblyInfo.cs index 6d93db2e4..31df1f475 100644 --- a/SDK/AppCenterAnalytics/Microsoft.AppCenter.Analytics.UWP/Properties/AssemblyInfo.cs +++ b/SDK/AppCenterAnalytics/Microsoft.AppCenter.Analytics.UWP/Properties/AssemblyInfo.cs @@ -29,6 +29,6 @@ // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("0.0.0.0")] -[assembly: AssemblyInformationalVersion("1.5.1-SNAPSHOT")] -[assembly: AssemblyFileVersion("1.5.1.0")] +[assembly: AssemblyInformationalVersion("1.6.0-SNAPSHOT")] +[assembly: AssemblyFileVersion("1.6.0.0")] [assembly: ComVisible(false)] diff --git a/SDK/AppCenterAnalytics/Microsoft.AppCenter.Analytics.WindowsDesktop/Properties/AssemblyInfo.cs b/SDK/AppCenterAnalytics/Microsoft.AppCenter.Analytics.WindowsDesktop/Properties/AssemblyInfo.cs index cbf274dc9..8ca73805b 100644 --- a/SDK/AppCenterAnalytics/Microsoft.AppCenter.Analytics.WindowsDesktop/Properties/AssemblyInfo.cs +++ b/SDK/AppCenterAnalytics/Microsoft.AppCenter.Analytics.WindowsDesktop/Properties/AssemblyInfo.cs @@ -23,5 +23,5 @@ // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("0.0.0.0")] -[assembly: AssemblyFileVersion("1.5.1.0")] -[assembly: AssemblyInformationalVersion("1.5.1-SNAPSHOT")] +[assembly: AssemblyFileVersion("1.6.0.0")] +[assembly: AssemblyInformationalVersion("1.6.0-SNAPSHOT")] diff --git a/SDK/AppCenterAnalytics/Microsoft.AppCenter.Analytics.iOS.Bindings/Properties/AssemblyInfo.cs b/SDK/AppCenterAnalytics/Microsoft.AppCenter.Analytics.iOS.Bindings/Properties/AssemblyInfo.cs index 3f4d7fbdf..271228724 100644 --- a/SDK/AppCenterAnalytics/Microsoft.AppCenter.Analytics.iOS.Bindings/Properties/AssemblyInfo.cs +++ b/SDK/AppCenterAnalytics/Microsoft.AppCenter.Analytics.iOS.Bindings/Properties/AssemblyInfo.cs @@ -30,5 +30,5 @@ // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("0.0.0.0")] -[assembly: AssemblyFileVersion("1.5.1.0")] -[assembly: AssemblyInformationalVersion("1.5.1-SNAPSHOT")] +[assembly: AssemblyFileVersion("1.6.0.0")] +[assembly: AssemblyInformationalVersion("1.6.0-SNAPSHOT")] diff --git a/SDK/AppCenterAnalytics/Microsoft.AppCenter.Analytics.iOS/Properties/AssemblyInfo.cs b/SDK/AppCenterAnalytics/Microsoft.AppCenter.Analytics.iOS/Properties/AssemblyInfo.cs index b224abe30..b5ffa146c 100644 --- a/SDK/AppCenterAnalytics/Microsoft.AppCenter.Analytics.iOS/Properties/AssemblyInfo.cs +++ b/SDK/AppCenterAnalytics/Microsoft.AppCenter.Analytics.iOS/Properties/AssemblyInfo.cs @@ -23,5 +23,5 @@ // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("0.0.0.0")] -[assembly: AssemblyFileVersion("1.5.1.0")] -[assembly: AssemblyInformationalVersion("1.5.1-SNAPSHOT")] +[assembly: AssemblyFileVersion("1.6.0.0")] +[assembly: AssemblyInformationalVersion("1.6.0-SNAPSHOT")] diff --git a/SDK/AppCenterAnalytics/Microsoft.AppCenter.Analytics/Microsoft.AppCenter.Analytics.csproj b/SDK/AppCenterAnalytics/Microsoft.AppCenter.Analytics/Microsoft.AppCenter.Analytics.csproj index a153023b8..e90b73661 100644 --- a/SDK/AppCenterAnalytics/Microsoft.AppCenter.Analytics/Microsoft.AppCenter.Analytics.csproj +++ b/SDK/AppCenterAnalytics/Microsoft.AppCenter.Analytics/Microsoft.AppCenter.Analytics.csproj @@ -6,9 +6,9 @@ Microsoft Corp. All rights reserved. Microsoft.AppCenter.Analytics Microsoft Corporation - 1.5.1-SNAPSHOT + 1.6.0-SNAPSHOT 0.0.0.0 - 1.5.1.0 + 1.6.0.0 Microsoft.AppCenter.Analytics diff --git a/SDK/AppCenterCrashes/Microsoft.AppCenter.Crashes.Android.Bindings/Properties/AssemblyInfo.cs b/SDK/AppCenterCrashes/Microsoft.AppCenter.Crashes.Android.Bindings/Properties/AssemblyInfo.cs index d7b757bcf..e1ebbf5ca 100644 --- a/SDK/AppCenterCrashes/Microsoft.AppCenter.Crashes.Android.Bindings/Properties/AssemblyInfo.cs +++ b/SDK/AppCenterCrashes/Microsoft.AppCenter.Crashes.Android.Bindings/Properties/AssemblyInfo.cs @@ -17,8 +17,8 @@ // and "{Major}.{Minor}.{Build}.*" will update just the revision. [assembly: AssemblyVersion("0.0.0.0")] -[assembly: AssemblyFileVersion("1.5.1.0")] -[assembly: AssemblyInformationalVersion("1.5.1-SNAPSHOT")] +[assembly: AssemblyFileVersion("1.6.0.0")] +[assembly: AssemblyInformationalVersion("1.6.0-SNAPSHOT")] // The following attributes are used to specify the signing key for the assembly, // if desired. See the Mono documentation for more information about signing. diff --git a/SDK/AppCenterCrashes/Microsoft.AppCenter.Crashes.Android/Properties/AssemblyInfo.cs b/SDK/AppCenterCrashes/Microsoft.AppCenter.Crashes.Android/Properties/AssemblyInfo.cs index 04a676834..dc45f86dd 100644 --- a/SDK/AppCenterCrashes/Microsoft.AppCenter.Crashes.Android/Properties/AssemblyInfo.cs +++ b/SDK/AppCenterCrashes/Microsoft.AppCenter.Crashes.Android/Properties/AssemblyInfo.cs @@ -26,5 +26,5 @@ // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("0.0.0.0")] -[assembly: AssemblyFileVersion("1.5.1.0")] -[assembly: AssemblyInformationalVersion("1.5.1-SNAPSHOT")] +[assembly: AssemblyFileVersion("1.6.0.0")] +[assembly: AssemblyInformationalVersion("1.6.0-SNAPSHOT")] diff --git a/SDK/AppCenterCrashes/Microsoft.AppCenter.Crashes.UWP/Properties/AssemblyInfo.cs b/SDK/AppCenterCrashes/Microsoft.AppCenter.Crashes.UWP/Properties/AssemblyInfo.cs index 5884f2e87..ab257a6f9 100644 --- a/SDK/AppCenterCrashes/Microsoft.AppCenter.Crashes.UWP/Properties/AssemblyInfo.cs +++ b/SDK/AppCenterCrashes/Microsoft.AppCenter.Crashes.UWP/Properties/AssemblyInfo.cs @@ -29,6 +29,6 @@ // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("0.0.0.0")] -[assembly: AssemblyFileVersion("1.5.1.0")] -[assembly: AssemblyInformationalVersion("1.5.1-SNAPSHOT")] +[assembly: AssemblyFileVersion("1.6.0.0")] +[assembly: AssemblyInformationalVersion("1.6.0-SNAPSHOT")] [assembly: ComVisible(false)] \ No newline at end of file diff --git a/SDK/AppCenterCrashes/Microsoft.AppCenter.Crashes.WindowsDesktop/Properties/AssemblyInfo.cs b/SDK/AppCenterCrashes/Microsoft.AppCenter.Crashes.WindowsDesktop/Properties/AssemblyInfo.cs index e70bdb2ae..527693bea 100644 --- a/SDK/AppCenterCrashes/Microsoft.AppCenter.Crashes.WindowsDesktop/Properties/AssemblyInfo.cs +++ b/SDK/AppCenterCrashes/Microsoft.AppCenter.Crashes.WindowsDesktop/Properties/AssemblyInfo.cs @@ -24,5 +24,5 @@ // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("0.0.0.0")] -[assembly: AssemblyFileVersion("1.5.1.0")] -[assembly: AssemblyInformationalVersion("1.5.1-SNAPSHOT")] +[assembly: AssemblyFileVersion("1.6.0.0")] +[assembly: AssemblyInformationalVersion("1.6.0-SNAPSHOT")] diff --git a/SDK/AppCenterCrashes/Microsoft.AppCenter.Crashes.iOS.Bindings/Properties/AssemblyInfo.cs b/SDK/AppCenterCrashes/Microsoft.AppCenter.Crashes.iOS.Bindings/Properties/AssemblyInfo.cs index b008dfb63..b57466748 100644 --- a/SDK/AppCenterCrashes/Microsoft.AppCenter.Crashes.iOS.Bindings/Properties/AssemblyInfo.cs +++ b/SDK/AppCenterCrashes/Microsoft.AppCenter.Crashes.iOS.Bindings/Properties/AssemblyInfo.cs @@ -30,5 +30,5 @@ // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("0.0.0.0")] -[assembly: AssemblyFileVersion("1.5.1.0")] -[assembly: AssemblyInformationalVersion("1.5.1-SNAPSHOT")] +[assembly: AssemblyFileVersion("1.6.0.0")] +[assembly: AssemblyInformationalVersion("1.6.0-SNAPSHOT")] diff --git a/SDK/AppCenterCrashes/Microsoft.AppCenter.Crashes.iOS/Properties/AssemblyInfo.cs b/SDK/AppCenterCrashes/Microsoft.AppCenter.Crashes.iOS/Properties/AssemblyInfo.cs index 2c81335ac..6b038a603 100644 --- a/SDK/AppCenterCrashes/Microsoft.AppCenter.Crashes.iOS/Properties/AssemblyInfo.cs +++ b/SDK/AppCenterCrashes/Microsoft.AppCenter.Crashes.iOS/Properties/AssemblyInfo.cs @@ -23,5 +23,5 @@ // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("0.0.0.0")] -[assembly: AssemblyFileVersion("1.5.1.0")] -[assembly: AssemblyInformationalVersion("1.5.1-SNAPSHOT")] +[assembly: AssemblyFileVersion("1.6.0.0")] +[assembly: AssemblyInformationalVersion("1.6.0-SNAPSHOT")] diff --git a/SDK/AppCenterCrashes/Microsoft.AppCenter.Crashes/Microsoft.AppCenter.Crashes.csproj b/SDK/AppCenterCrashes/Microsoft.AppCenter.Crashes/Microsoft.AppCenter.Crashes.csproj index 8c2be2629..89dd6a5d9 100644 --- a/SDK/AppCenterCrashes/Microsoft.AppCenter.Crashes/Microsoft.AppCenter.Crashes.csproj +++ b/SDK/AppCenterCrashes/Microsoft.AppCenter.Crashes/Microsoft.AppCenter.Crashes.csproj @@ -7,9 +7,9 @@ Microsoft Corp. All rights reserved. Microsoft.AppCenter.Crashes Microsoft Corporation - 1.5.1-SNAPSHOT + 1.6.0-SNAPSHOT 0.0.0.0 - 1.5.1.0 + 1.6.0.0 Microsoft.AppCenter.Crashes diff --git a/SDK/AppCenterDistribute/Microsoft.AppCenter.Distribute.Android.Bindings/Properties/AssemblyInfo.cs b/SDK/AppCenterDistribute/Microsoft.AppCenter.Distribute.Android.Bindings/Properties/AssemblyInfo.cs index 688f65e99..63addb513 100644 --- a/SDK/AppCenterDistribute/Microsoft.AppCenter.Distribute.Android.Bindings/Properties/AssemblyInfo.cs +++ b/SDK/AppCenterDistribute/Microsoft.AppCenter.Distribute.Android.Bindings/Properties/AssemblyInfo.cs @@ -17,8 +17,8 @@ // and "{Major}.{Minor}.{Build}.*" will update just the revision. [assembly: AssemblyVersion("0.0.0.0")] -[assembly: AssemblyFileVersion("1.5.1.0")] -[assembly: AssemblyInformationalVersion("1.5.1-SNAPSHOT")] +[assembly: AssemblyFileVersion("1.6.0.0")] +[assembly: AssemblyInformationalVersion("1.6.0-SNAPSHOT")] // The following attributes are used to specify the signing key for the assembly, // if desired. See the Mono documentation for more information about signing. diff --git a/SDK/AppCenterDistribute/Microsoft.AppCenter.Distribute.Android/Properties/AssemblyInfo.cs b/SDK/AppCenterDistribute/Microsoft.AppCenter.Distribute.Android/Properties/AssemblyInfo.cs index 79541d446..0820c4694 100644 --- a/SDK/AppCenterDistribute/Microsoft.AppCenter.Distribute.Android/Properties/AssemblyInfo.cs +++ b/SDK/AppCenterDistribute/Microsoft.AppCenter.Distribute.Android/Properties/AssemblyInfo.cs @@ -25,5 +25,5 @@ // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("0.0.0.0")] -[assembly: AssemblyFileVersion("1.5.1.0")] -[assembly: AssemblyInformationalVersion("1.5.1-SNAPSHOT")] +[assembly: AssemblyFileVersion("1.6.0.0")] +[assembly: AssemblyInformationalVersion("1.6.0-SNAPSHOT")] diff --git a/SDK/AppCenterDistribute/Microsoft.AppCenter.Distribute.iOS.Bindings/Properties/AssemblyInfo.cs b/SDK/AppCenterDistribute/Microsoft.AppCenter.Distribute.iOS.Bindings/Properties/AssemblyInfo.cs index 9e88d1617..72d533665 100644 --- a/SDK/AppCenterDistribute/Microsoft.AppCenter.Distribute.iOS.Bindings/Properties/AssemblyInfo.cs +++ b/SDK/AppCenterDistribute/Microsoft.AppCenter.Distribute.iOS.Bindings/Properties/AssemblyInfo.cs @@ -32,5 +32,5 @@ // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("0.0.0.0")] -[assembly: AssemblyFileVersion("1.5.1.0")] -[assembly: AssemblyInformationalVersion("1.5.1-SNAPSHOT")] +[assembly: AssemblyFileVersion("1.6.0.0")] +[assembly: AssemblyInformationalVersion("1.6.0-SNAPSHOT")] diff --git a/SDK/AppCenterDistribute/Microsoft.AppCenter.Distribute.iOS/Properties/AssemblyInfo.cs b/SDK/AppCenterDistribute/Microsoft.AppCenter.Distribute.iOS/Properties/AssemblyInfo.cs index fe7f3bf26..6ade95cad 100644 --- a/SDK/AppCenterDistribute/Microsoft.AppCenter.Distribute.iOS/Properties/AssemblyInfo.cs +++ b/SDK/AppCenterDistribute/Microsoft.AppCenter.Distribute.iOS/Properties/AssemblyInfo.cs @@ -24,5 +24,5 @@ // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("0.0.0.0")] -[assembly: AssemblyFileVersion("1.5.1.0")] -[assembly: AssemblyInformationalVersion("1.5.1-SNAPSHOT")] +[assembly: AssemblyFileVersion("1.6.0.0")] +[assembly: AssemblyInformationalVersion("1.6.0-SNAPSHOT")] diff --git a/SDK/AppCenterDistribute/Microsoft.AppCenter.Distribute/Microsoft.AppCenter.Distribute.csproj b/SDK/AppCenterDistribute/Microsoft.AppCenter.Distribute/Microsoft.AppCenter.Distribute.csproj index d60591414..4f4de68f4 100644 --- a/SDK/AppCenterDistribute/Microsoft.AppCenter.Distribute/Microsoft.AppCenter.Distribute.csproj +++ b/SDK/AppCenterDistribute/Microsoft.AppCenter.Distribute/Microsoft.AppCenter.Distribute.csproj @@ -7,9 +7,9 @@ Microsoft Corp. All rights reserved. Microsoft.AppCenter.Distribute Microsoft Corporation - 1.5.1-SNAPSHOT + 1.6.0-SNAPSHOT 0.0.0.0 - 1.5.1.0 + 1.6.0.0 Microsoft.AppCenter.Distribute diff --git a/SDK/AppCenterPush/Microsoft.AppCenter.Push.Android.Bindings/Properties/AssemblyInfo.cs b/SDK/AppCenterPush/Microsoft.AppCenter.Push.Android.Bindings/Properties/AssemblyInfo.cs index 7a7ff4397..00c391e75 100644 --- a/SDK/AppCenterPush/Microsoft.AppCenter.Push.Android.Bindings/Properties/AssemblyInfo.cs +++ b/SDK/AppCenterPush/Microsoft.AppCenter.Push.Android.Bindings/Properties/AssemblyInfo.cs @@ -24,5 +24,5 @@ // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("0.0.0.0")] -[assembly: AssemblyFileVersion("1.5.1.0")] -[assembly: AssemblyInformationalVersion("1.5.1-SNAPSHOT")] +[assembly: AssemblyFileVersion("1.6.0.0")] +[assembly: AssemblyInformationalVersion("1.6.0-SNAPSHOT")] diff --git a/SDK/AppCenterPush/Microsoft.AppCenter.Push.Android/Properties/AssemblyInfo.cs b/SDK/AppCenterPush/Microsoft.AppCenter.Push.Android/Properties/AssemblyInfo.cs index 9a98e3ba2..e5f16299a 100644 --- a/SDK/AppCenterPush/Microsoft.AppCenter.Push.Android/Properties/AssemblyInfo.cs +++ b/SDK/AppCenterPush/Microsoft.AppCenter.Push.Android/Properties/AssemblyInfo.cs @@ -24,5 +24,5 @@ // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("0.0.0.0")] -[assembly: AssemblyFileVersion("1.5.1.0")] -[assembly: AssemblyInformationalVersion("1.5.1-SNAPSHOT")] +[assembly: AssemblyFileVersion("1.6.0.0")] +[assembly: AssemblyInformationalVersion("1.6.0-SNAPSHOT")] diff --git a/SDK/AppCenterPush/Microsoft.AppCenter.Push.UWP/Properties/AssemblyInfo.cs b/SDK/AppCenterPush/Microsoft.AppCenter.Push.UWP/Properties/AssemblyInfo.cs index 4f7672563..695ab215c 100644 --- a/SDK/AppCenterPush/Microsoft.AppCenter.Push.UWP/Properties/AssemblyInfo.cs +++ b/SDK/AppCenterPush/Microsoft.AppCenter.Push.UWP/Properties/AssemblyInfo.cs @@ -28,6 +28,6 @@ [assembly: ReferenceAssembly] #endif [assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.5.1.0")] +[assembly: AssemblyFileVersion("1.6.0.0")] [assembly: ComVisible(false)] [assembly: InternalsVisibleTo("Microsoft.AppCenter.Test.UWP")] \ No newline at end of file diff --git a/SDK/AppCenterPush/Microsoft.AppCenter.Push.iOS.Bindings/Properties/AssemblyInfo.cs b/SDK/AppCenterPush/Microsoft.AppCenter.Push.iOS.Bindings/Properties/AssemblyInfo.cs index 06e1d4682..dacbe0396 100644 --- a/SDK/AppCenterPush/Microsoft.AppCenter.Push.iOS.Bindings/Properties/AssemblyInfo.cs +++ b/SDK/AppCenterPush/Microsoft.AppCenter.Push.iOS.Bindings/Properties/AssemblyInfo.cs @@ -30,5 +30,5 @@ // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("0.0.0.0")] -[assembly: AssemblyFileVersion("1.5.1.0")] -[assembly: AssemblyInformationalVersion("1.5.1-SNAPSHOT")] +[assembly: AssemblyFileVersion("1.6.0.0")] +[assembly: AssemblyInformationalVersion("1.6.0-SNAPSHOT")] diff --git a/SDK/AppCenterPush/Microsoft.AppCenter.Push.iOS/Properties/AssemblyInfo.cs b/SDK/AppCenterPush/Microsoft.AppCenter.Push.iOS/Properties/AssemblyInfo.cs index 86f94c0ae..92fedb2ef 100644 --- a/SDK/AppCenterPush/Microsoft.AppCenter.Push.iOS/Properties/AssemblyInfo.cs +++ b/SDK/AppCenterPush/Microsoft.AppCenter.Push.iOS/Properties/AssemblyInfo.cs @@ -24,5 +24,5 @@ // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("0.0.0.0")] -[assembly: AssemblyFileVersion("1.5.1.0")] -[assembly: AssemblyInformationalVersion("1.5.1-SNAPSHOT")] +[assembly: AssemblyFileVersion("1.6.0.0")] +[assembly: AssemblyInformationalVersion("1.6.0-SNAPSHOT")] diff --git a/SDK/AppCenterPush/Microsoft.AppCenter.Push/Microsoft.AppCenter.Push.csproj b/SDK/AppCenterPush/Microsoft.AppCenter.Push/Microsoft.AppCenter.Push.csproj index 14b3ceb74..fa57d0273 100644 --- a/SDK/AppCenterPush/Microsoft.AppCenter.Push/Microsoft.AppCenter.Push.csproj +++ b/SDK/AppCenterPush/Microsoft.AppCenter.Push/Microsoft.AppCenter.Push.csproj @@ -7,9 +7,9 @@ Microsoft Corp. All rights reserved. Microsoft.AppCenter.Push Microsoft Corporation - 1.5.1-SNAPSHOT + 1.6.0-SNAPSHOT 0.0.0.0 - 1.5.1.0 + 1.6.0.0 Microsoft.AppCenter.Push diff --git a/SDK/AppCenterRum/Microsoft.AppCenter.Rum.Android/Properties/AssemblyInfo.cs b/SDK/AppCenterRum/Microsoft.AppCenter.Rum.Android/Properties/AssemblyInfo.cs index 0d20aaa00..d4a060144 100644 --- a/SDK/AppCenterRum/Microsoft.AppCenter.Rum.Android/Properties/AssemblyInfo.cs +++ b/SDK/AppCenterRum/Microsoft.AppCenter.Rum.Android/Properties/AssemblyInfo.cs @@ -24,5 +24,5 @@ // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("0.0.0.0")] -[assembly: AssemblyFileVersion("1.5.1.0")] -[assembly: AssemblyInformationalVersion("1.5.1-SNAPSHOT")] +[assembly: AssemblyFileVersion("1.6.0.0")] +[assembly: AssemblyInformationalVersion("1.6.0-SNAPSHOT")] diff --git a/SDK/AppCenterRum/Microsoft.AppCenter.Rum.UWP/Properties/AssemblyInfo.cs b/SDK/AppCenterRum/Microsoft.AppCenter.Rum.UWP/Properties/AssemblyInfo.cs index 085f59838..be3e857a4 100644 --- a/SDK/AppCenterRum/Microsoft.AppCenter.Rum.UWP/Properties/AssemblyInfo.cs +++ b/SDK/AppCenterRum/Microsoft.AppCenter.Rum.UWP/Properties/AssemblyInfo.cs @@ -25,5 +25,5 @@ // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("0.0.0.0")] -[assembly: AssemblyFileVersion("1.5.1.0")] +[assembly: AssemblyFileVersion("1.6.0.0")] [assembly: ComVisible(false)] \ No newline at end of file diff --git a/SDK/AppCenterRum/Microsoft.AppCenter.Rum/Microsoft.AppCenter.Rum.csproj b/SDK/AppCenterRum/Microsoft.AppCenter.Rum/Microsoft.AppCenter.Rum.csproj index 23b12da29..e105ff88a 100644 --- a/SDK/AppCenterRum/Microsoft.AppCenter.Rum/Microsoft.AppCenter.Rum.csproj +++ b/SDK/AppCenterRum/Microsoft.AppCenter.Rum/Microsoft.AppCenter.Rum.csproj @@ -7,9 +7,9 @@ Microsoft Corp. All rights reserved. Microsoft.AppCenter.Rum Microsoft Corporation - 1.5.1-SNAPSHOT + 1.6.0-SNAPSHOT 0.0.0.0 - 1.5.1.0 + 1.6.0.0 Microsoft.AppCenter.Rum diff --git a/Tests/Contoso.Forms.Test/Properties/AssemblyInfo.cs b/Tests/Contoso.Forms.Test/Properties/AssemblyInfo.cs index 5fb98746d..61b19d839 100644 --- a/Tests/Contoso.Forms.Test/Properties/AssemblyInfo.cs +++ b/Tests/Contoso.Forms.Test/Properties/AssemblyInfo.cs @@ -17,8 +17,8 @@ // and "{Major}.{Minor}.{Build}.*" will update just the revision. [assembly: AssemblyVersion("0.0.0.0")] -[assembly: AssemblyFileVersion("1.5.1.0")] -[assembly: AssemblyInformationalVersion("1.5.1-SNAPSHOT")] +[assembly: AssemblyFileVersion("1.6.0.0")] +[assembly: AssemblyInformationalVersion("1.6.0-SNAPSHOT")] // The following attributes are used to specify the signing key for the assembly, // if desired. See the Mono documentation for more information about signing. diff --git a/Tests/Droid/Properties/AndroidManifest.xml b/Tests/Droid/Properties/AndroidManifest.xml index 6680cdd9d..8b3f85fb4 100644 --- a/Tests/Droid/Properties/AndroidManifest.xml +++ b/Tests/Droid/Properties/AndroidManifest.xml @@ -1,5 +1,5 @@ - + diff --git a/Tests/Droid/Properties/AssemblyInfo.cs b/Tests/Droid/Properties/AssemblyInfo.cs index 7f6dc40ed..d397fe978 100644 --- a/Tests/Droid/Properties/AssemblyInfo.cs +++ b/Tests/Droid/Properties/AssemblyInfo.cs @@ -17,8 +17,8 @@ // and "{Major}.{Minor}.{Build}.*" will update just the revision. [assembly: AssemblyVersion("0.0.0.0")] -[assembly: AssemblyFileVersion("1.5.1.0")] -[assembly: AssemblyInformationalVersion("1.5.1-SNAPSHOT")] +[assembly: AssemblyFileVersion("1.6.0.0")] +[assembly: AssemblyInformationalVersion("1.6.0-SNAPSHOT")] // The following attributes are used to specify the signing key for the assembly, // if desired. See the Mono documentation for more information about signing. diff --git a/Tests/Microsoft.AppCenter.Analytics.NET/Properties/AssemblyInfo.cs b/Tests/Microsoft.AppCenter.Analytics.NET/Properties/AssemblyInfo.cs index 192f73483..644d3ea7b 100644 --- a/Tests/Microsoft.AppCenter.Analytics.NET/Properties/AssemblyInfo.cs +++ b/Tests/Microsoft.AppCenter.Analytics.NET/Properties/AssemblyInfo.cs @@ -33,7 +33,7 @@ // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("0.0.0.0")] -[assembly: AssemblyFileVersion("1.5.1.0")] -[assembly: AssemblyInformationalVersion("1.5.1-SNAPSHOT")] +[assembly: AssemblyFileVersion("1.6.0.0")] +[assembly: AssemblyInformationalVersion("1.6.0-SNAPSHOT")] [assembly: InternalsVisibleTo("Microsoft.AppCenter.Analytics.Test.Windows")] \ No newline at end of file diff --git a/Tests/Microsoft.AppCenter.Analytics.Test.Windows/Properties/AssemblyInfo.cs b/Tests/Microsoft.AppCenter.Analytics.Test.Windows/Properties/AssemblyInfo.cs index a73294bf0..99ea13d53 100644 --- a/Tests/Microsoft.AppCenter.Analytics.Test.Windows/Properties/AssemblyInfo.cs +++ b/Tests/Microsoft.AppCenter.Analytics.Test.Windows/Properties/AssemblyInfo.cs @@ -16,5 +16,5 @@ // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("0.0.0.0")] -[assembly: AssemblyFileVersion("1.5.1.0")] -[assembly: AssemblyInformationalVersion("1.5.1-SNAPSHOT")] +[assembly: AssemblyFileVersion("1.6.0.0")] +[assembly: AssemblyInformationalVersion("1.6.0-SNAPSHOT")] diff --git a/Tests/Microsoft.AppCenter.NET/Properties/AssemblyInfo.cs b/Tests/Microsoft.AppCenter.NET/Properties/AssemblyInfo.cs index 5f510a333..bc612e494 100644 --- a/Tests/Microsoft.AppCenter.NET/Properties/AssemblyInfo.cs +++ b/Tests/Microsoft.AppCenter.NET/Properties/AssemblyInfo.cs @@ -33,8 +33,8 @@ // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("0.0.0.0")] -[assembly: AssemblyFileVersion("1.5.1.0")] -[assembly: AssemblyInformationalVersion("1.5.1-SNAPSHOT")] +[assembly: AssemblyFileVersion("1.6.0.0")] +[assembly: AssemblyInformationalVersion("1.6.0-SNAPSHOT")] [assembly: InternalsVisibleTo("Microsoft.AppCenter.Test.Windows")] [assembly: InternalsVisibleTo("Microsoft.AppCenter.Analytics.Test.Windows")] diff --git a/Tests/Microsoft.AppCenter.Push.NET/Properties/AssemblyInfo.cs b/Tests/Microsoft.AppCenter.Push.NET/Properties/AssemblyInfo.cs index 31eb26297..157db6b1d 100644 --- a/Tests/Microsoft.AppCenter.Push.NET/Properties/AssemblyInfo.cs +++ b/Tests/Microsoft.AppCenter.Push.NET/Properties/AssemblyInfo.cs @@ -33,4 +33,4 @@ // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.5.1.0")] +[assembly: AssemblyFileVersion("1.6.0.0")] diff --git a/Tests/Microsoft.AppCenter.Push.Test.Windows/Properties/AssemblyInfo.cs b/Tests/Microsoft.AppCenter.Push.Test.Windows/Properties/AssemblyInfo.cs index ecc3ce8b7..308c13ffd 100644 --- a/Tests/Microsoft.AppCenter.Push.Test.Windows/Properties/AssemblyInfo.cs +++ b/Tests/Microsoft.AppCenter.Push.Test.Windows/Properties/AssemblyInfo.cs @@ -33,4 +33,4 @@ // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.5.1.0")] +[assembly: AssemblyFileVersion("1.6.0.0")] diff --git a/Tests/Microsoft.AppCenter.Test.UWP/Package.appxmanifest b/Tests/Microsoft.AppCenter.Test.UWP/Package.appxmanifest index 6e321bdfd..06ed51603 100644 --- a/Tests/Microsoft.AppCenter.Test.UWP/Package.appxmanifest +++ b/Tests/Microsoft.AppCenter.Test.UWP/Package.appxmanifest @@ -7,7 +7,7 @@ + Version="1.6.0.0" /> diff --git a/Tests/Microsoft.AppCenter.Test.UWP/Properties/AssemblyInfo.cs b/Tests/Microsoft.AppCenter.Test.UWP/Properties/AssemblyInfo.cs index 76b42677d..284b4135b 100644 --- a/Tests/Microsoft.AppCenter.Test.UWP/Properties/AssemblyInfo.cs +++ b/Tests/Microsoft.AppCenter.Test.UWP/Properties/AssemblyInfo.cs @@ -14,5 +14,5 @@ // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.5.1.0")] +[assembly: AssemblyFileVersion("1.6.0.0")] [assembly: ComVisible(false)] \ No newline at end of file diff --git a/Tests/Microsoft.AppCenter.Test.Windows/Properties/AssemblyInfo.cs b/Tests/Microsoft.AppCenter.Test.Windows/Properties/AssemblyInfo.cs index cc47a9bab..02a069515 100644 --- a/Tests/Microsoft.AppCenter.Test.Windows/Properties/AssemblyInfo.cs +++ b/Tests/Microsoft.AppCenter.Test.Windows/Properties/AssemblyInfo.cs @@ -16,5 +16,5 @@ // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("0.0.0.0")] -[assembly: AssemblyFileVersion("1.5.1.0")] -[assembly: AssemblyInformationalVersion("1.5.1-SNAPSHOT")] +[assembly: AssemblyFileVersion("1.6.0.0")] +[assembly: AssemblyInformationalVersion("1.6.0-SNAPSHOT")] diff --git a/Tests/Microsoft.AppCenter.Test.WindowsDesktop/Properties/AssemblyInfo.cs b/Tests/Microsoft.AppCenter.Test.WindowsDesktop/Properties/AssemblyInfo.cs index 3b9083cbf..990f6e5b8 100644 --- a/Tests/Microsoft.AppCenter.Test.WindowsDesktop/Properties/AssemblyInfo.cs +++ b/Tests/Microsoft.AppCenter.Test.WindowsDesktop/Properties/AssemblyInfo.cs @@ -17,4 +17,4 @@ // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.5.1.0")] +[assembly: AssemblyFileVersion("1.6.0.0")] diff --git a/Tests/iOS/Info.plist b/Tests/iOS/Info.plist index 65bf888a5..0453fe3e3 100644 --- a/Tests/iOS/Info.plist +++ b/Tests/iOS/Info.plist @@ -9,9 +9,9 @@ CFBundleIdentifier com.contoso.contoso-forms-test CFBundleShortVersionString - 1.5.1 + 1.6.0 CFBundleVersion - 1.5.1 + 1.6.0 LSRequiresIPhoneOS MinimumOSVersion diff --git a/scripts/configuration/ac-build-config.xml b/scripts/configuration/ac-build-config.xml index e62f21a49..7be4ac363 100644 --- a/scripts/configuration/ac-build-config.xml +++ b/scripts/configuration/ac-build-config.xml @@ -1,9 +1,9 @@ - 1.5.1-SNAPSHOT - 1.5.0 - 1.4.0 + 1.6.0-SNAPSHOT + 1.6.0 + 1.5.0