From 6af5b2a83f032f2c56c8968ad753f70016dce803 Mon Sep 17 00:00:00 2001 From: arifBurakDemiray Date: Wed, 27 Sep 2023 14:12:24 +0300 Subject: [PATCH] revert: changes --- .../count/java/demo/BackendModeExample.java | 1 - .../demo/BackendModePerformanceTests.java | 1 - .../sdk/java/internal/BackendModeTests.java | 30 +++++++++---------- 3 files changed, 14 insertions(+), 18 deletions(-) diff --git a/app-java/src/main/java/ly/count/java/demo/BackendModeExample.java b/app-java/src/main/java/ly/count/java/demo/BackendModeExample.java index 0dabf841e..91ee51d4c 100644 --- a/app-java/src/main/java/ly/count/java/demo/BackendModeExample.java +++ b/app-java/src/main/java/ly/count/java/demo/BackendModeExample.java @@ -9,7 +9,6 @@ import java.util.Scanner; import java.util.concurrent.CountDownLatch; - public class BackendModeExample { final static String DEVICE_ID = "device-id"; final static String COUNTLY_APP_KEY = "COUNTLY_APP_KEY"; diff --git a/app-java/src/main/java/ly/count/java/demo/BackendModePerformanceTests.java b/app-java/src/main/java/ly/count/java/demo/BackendModePerformanceTests.java index 027f71cbc..7645fe756 100644 --- a/app-java/src/main/java/ly/count/java/demo/BackendModePerformanceTests.java +++ b/app-java/src/main/java/ly/count/java/demo/BackendModePerformanceTests.java @@ -9,7 +9,6 @@ import java.util.Map; import java.util.Scanner; - public class BackendModePerformanceTests { final static String DEVICE_ID = "device-id"; final static String COUNTLY_APP_KEY = "COUNTLY_APP_KEY"; diff --git a/sdk-java/src/test/java/ly/count/sdk/java/internal/BackendModeTests.java b/sdk-java/src/test/java/ly/count/sdk/java/internal/BackendModeTests.java index 289771702..51a38e10f 100644 --- a/sdk-java/src/test/java/ly/count/sdk/java/internal/BackendModeTests.java +++ b/sdk-java/src/test/java/ly/count/sdk/java/internal/BackendModeTests.java @@ -1,25 +1,19 @@ package ly.count.sdk.java.internal; -import java.io.File; -import java.io.PrintWriter; -import java.io.StringWriter; -import java.math.BigDecimal; -import java.util.Calendar; -import java.util.HashMap; -import java.util.Map; import ly.count.sdk.java.Config; import ly.count.sdk.java.Countly; import org.json.JSONArray; import org.json.JSONObject; -import org.junit.After; -import org.junit.AfterClass; -import org.junit.Assert; -import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.Test; +import org.junit.*; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; +import java.io.File; +import java.io.PrintWriter; +import java.io.StringWriter; +import java.math.BigDecimal; +import java.util.*; + @RunWith(JUnit4.class) public class BackendModeTests { private ModuleBackendMode moduleBackendMode; @@ -31,8 +25,12 @@ public static void init() { cc.setEventQueueSizeToSend(4).enableBackendMode(); // System specific folder structure - File sdkStorageRootDirectory = TestUtils.getSdkStorageRootDirectory(); - TestUtils.checkSdkStorageRootDirectoryExist(sdkStorageRootDirectory); + String[] sdkStorageRootPath = { System.getProperty("user.home"), "__COUNTLY", "java_test" }; + File sdkStorageRootDirectory = new File(String.join(File.separator, sdkStorageRootPath)); + + if(sdkStorageRootDirectory.mkdirs()){ + System.out.println("Directory creation failed"); + } Countly.init(sdkStorageRootDirectory, cc); } @@ -958,4 +956,4 @@ private int getHourFromTimeStamp(long timeStamp) { return calendar.get(Calendar.HOUR_OF_DAY); } -} +} \ No newline at end of file