Skip to content

Commit

Permalink
[Windows] implement backend mode (#107)
Browse files Browse the repository at this point in the history
* feat: backend mode init

* feat: test project init

* fix: delete accidently sent server info

* fix: code cleanup

* feat: internal config params

* feat: print test result to the wpf

* feat: on timer for backend mode

* feat: use on timer for net45 and 35

* feat: added basic logs

* fix: fix backend mode check

* fix: tinker with timer starts and stops

* fix: revert maui changes

* feat: backendMode checking

* Update ModuleBackendMode.cs

* fix: update calls

* fix: backend mode check

* feat: update timer calls

* faet: revert

* fix: timer call

* fix: revert updat calls

* feat: config key for each limit

* faet: add lock to the event cache

* feat: add missing upload call to the base

* fix: remove calls

* feat: printing state for debugging

* feat: backend test app to the net45

* feat: net35 backend mode test

* fix: for loop for net35

* feat: update version

* faet: update version

* fix: sign prop

* feat: update changelog

* fix: version

* Fixing imports for tests

---------

Co-authored-by: ArtursK <kadikis.arturs@gmail.com>
  • Loading branch information
arifBurakDemiray and ArtursKadikis committed Dec 13, 2023
1 parent e1ec60f commit 1a10595
Show file tree
Hide file tree
Showing 49 changed files with 1,615 additions and 39 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
@@ -1,3 +1,12 @@
## 23.12.0
* Backend mode added and accesible through "Countly.Instance.BackendMode()" interface
* The following methods added to the "CountlyConfig":
* "EnableBackendMode" function added to enable backend mode
* "SetMaxRequestQueueSize" to change maximum request queue size, can be used only with backend mode for now
* "SetMaxRequestQueueSize" to change maximum event queue size, can be used only with backend mode for now
* "SetBackendModeAppEQSizeToSend" to change backend mode per app event cache maximum size
* "SetBackendModeServerEQSizeToSend" to change backend mode global event cache maximum size

## 23.02.0
* !! Major breaking change !! Explicit support (and an SDK flavor) for "Portable Class Library Profile 259 (.NETFramework 4.5, Windows 8.0, WindowsPhone 8.0, WindowsPhoneApp 8.1)" has been removed.
* !! Major breaking change !! Explicit support (and an SDK flavor) for ".NET Framework 4.0 Client library" has been removed.
Expand Down
1 change: 1 addition & 0 deletions countlyCommon/TestingRelated/ConsentTests.cs
Expand Up @@ -4,6 +4,7 @@
using System.Linq;
using System.Web;
using CountlySDK;
using CountlySDK.CountlyCommon.Entities;
using CountlySDK.Entities;
using Newtonsoft.Json.Linq;
using Xunit;
Expand Down
3 changes: 2 additions & 1 deletion countlyCommon/TestingRelated/CountlyTestCases.cs
Expand Up @@ -3,6 +3,7 @@
using System.IO;
using System.Threading;
using CountlySDK;
using CountlySDK.CountlyCommon.Entities;
using CountlySDK.Entities;
using Xunit;

Expand Down Expand Up @@ -178,7 +179,7 @@ public async void UploadingUserPicture()
CountlyUserDetails cud = Countly.UserDetails;
cud.Name = "PinocioWithARealImage";

var res = await Countly.Instance.Upload();
bool res = await Countly.Instance.Upload();

//todo, test is succeeding, but not really uploading
MemoryStream ms = TestHelper.MemoryStreamRead(TestHelper.testDataLocation + "\\sample_image.png");
Expand Down
Expand Up @@ -2,7 +2,10 @@
using System.Collections.Generic;
using System.IO;
using CountlySDK;
using CountlySDK.CountlyCommon.Entities;
using CountlySDK.Entities;
using CountlySDK.Entities.EntityBase;
using CountlySDK.Helpers;
using Xunit;

namespace TestProject_common
Expand Down
2 changes: 2 additions & 0 deletions countlyCommon/TestingRelated/DeviceIdTests.cs
Expand Up @@ -4,7 +4,9 @@
using System.Linq;
using System.Web;
using CountlySDK;
using CountlySDK.CountlyCommon.Entities;
using CountlySDK.Entities;
using CountlySDK.Entities.EntityBase;
using Newtonsoft.Json.Linq;
using Xunit;
using static CountlySDK.CountlyCommon.CountlyBase;
Expand Down
7 changes: 6 additions & 1 deletion countlyCommon/TestingRelated/RequestTestCases.cs
Expand Up @@ -4,8 +4,13 @@
using System.Threading.Tasks;
using System.Web;
using CountlySDK;
using CountlySDK.CountlyCommon.Entities;
using CountlySDK.CountlyCommon.Helpers;
using CountlySDK.Entities;
using CountlySDK.Entities.EntityBase;
using Xunit;
using static CountlySDK.CountlyCommon.Helpers.RequestHelper;
using static CountlySDK.Helpers.TimeHelper;

namespace TestProject_common
{
Expand Down Expand Up @@ -58,7 +63,7 @@ public async void ValidateBaseRequestParams()

Assert.Equal("YOUR_APP_KEY", baseParams["app_key"]);
Assert.Equal("test device id", baseParams["device_id"]);
Assert.Equal("23.02.0", baseParams["sdk_version"]);
Assert.Equal("23.12.0", baseParams["sdk_version"]);
Assert.Equal(0, baseParams["t"]);

Assert.True(baseParams.ContainsKey("sdk_name"));
Expand Down
1 change: 1 addition & 0 deletions countlyCommon/TestingRelated/SessionTests.cs
Expand Up @@ -3,6 +3,7 @@
using System.Collections.Specialized;
using System.Web;
using CountlySDK;
using CountlySDK.CountlyCommon.Entities;
using CountlySDK.Entities;
using Xunit;
using static CountlySDK.CountlyCommon.CountlyBase;
Expand Down
4 changes: 4 additions & 0 deletions countlyCommon/TestingRelated/TestHelper.cs
Expand Up @@ -7,9 +7,13 @@
using System.Threading;
using System.Threading.Tasks;
using CountlySDK;
using CountlySDK.CountlyCommon.Entities;
using CountlySDK.Entities;
using CountlySDK.Entities.EntityBase;
using CountlySDK.Helpers;
using Xunit;
using static CountlySDK.CountlyCommon.CountlyBase;
using static CountlySDK.Helpers.TimeHelper;

namespace TestProject_common
{
Expand Down
3 changes: 3 additions & 0 deletions countlyCommon/TestingRelated/TestingEntities.cs
Expand Up @@ -2,9 +2,12 @@
using System.Collections.Generic;
using System.Linq;
using CountlySDK;
using CountlySDK.CountlyCommon.Entities;
using CountlySDK.Entities;
using CountlySDK.Helpers;
using Newtonsoft.Json;
using Xunit;
using static CountlySDK.Helpers.TimeHelper;

namespace TestProject_common
{
Expand Down

0 comments on commit 1a10595

Please sign in to comment.