-
Notifications
You must be signed in to change notification settings - Fork 101
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: enable checkstyle in sdk module (#312)
- Loading branch information
Showing
13 changed files
with
95 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 11 additions & 6 deletions
17
sdk/src/main/java/com/microsoft/hydralab/agent/runner/TestRunThreadContext.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,33 @@ | ||
// Copyright (c) Microsoft Corporation. | ||
// Licensed under the MIT License. | ||
|
||
package com.microsoft.hydralab.agent.runner; | ||
|
||
/** | ||
* We will gradually deprecate ThreadParam and AppiumParam, and migrate to this. | ||
* | ||
*/ | ||
public class TestRunThreadContext { | ||
private static final InheritableThreadLocal<ITestRun> testRunThreadLocal = new InheritableThreadLocal<>(); | ||
public final class TestRunThreadContext { | ||
private static final InheritableThreadLocal<ITestRun> TEST_RUN_INHERITABLE_THREAD_LOCAL = new InheritableThreadLocal<>(); | ||
|
||
private TestRunThreadContext() { | ||
|
||
} | ||
|
||
/** | ||
* Should be called in the TestRunner setup lifecycle | ||
* | ||
* @param testRun | ||
*/ | ||
static void init(ITestRun testRun) { | ||
clean(); | ||
testRunThreadLocal.set(testRun); | ||
TEST_RUN_INHERITABLE_THREAD_LOCAL.set(testRun); | ||
} | ||
|
||
public static void clean() { | ||
testRunThreadLocal.remove(); | ||
TEST_RUN_INHERITABLE_THREAD_LOCAL.remove(); | ||
} | ||
|
||
public static ITestRun getTestRun() { | ||
return testRunThreadLocal.get(); | ||
return TEST_RUN_INHERITABLE_THREAD_LOCAL.get(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 15 additions & 12 deletions
27
sdk/src/main/java/com/microsoft/hydralab/appium/ThreadParam.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
sdk/src/main/java/com/microsoft/hydralab/performance/IPerformanceInspectionService.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletions
6
sdk/src/main/java/com/microsoft/hydralab/performance/InspectionStrategy.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 11 additions & 1 deletion
12
sdk/src/main/java/com/microsoft/hydralab/performance/PerformanceInspection.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 5 additions & 1 deletion
6
sdk/src/main/java/com/microsoft/hydralab/performance/PerformanceInspectionResult.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 3 additions & 2 deletions
5
sdk/src/main/java/com/microsoft/hydralab/performance/PerformanceResultParser.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,16 @@ | ||
// Copyright (c) Microsoft Corporation. | ||
// Licensed under the MIT License. | ||
|
||
package com.microsoft.hydralab.performance; | ||
|
||
public interface PerformanceResultParser { | ||
PerformanceTestResult parse(PerformanceTestResult performanceTestResult); | ||
|
||
enum PerformanceResultParserType { | ||
PARSER_ANDROID_MEMORY_DUMP, | ||
PARSER_ANDROID_MEMORY_INFO, | ||
PARSER_ANDROID_BATTERY_INFO, | ||
PARSER_WIN_BATTERY, | ||
PARSER_WIN_MEMORY | ||
} | ||
|
||
PerformanceTestResult parse(PerformanceTestResult performanceTestResult); | ||
} |
28 changes: 16 additions & 12 deletions
28
sdk/src/main/java/com/microsoft/hydralab/performance/PerformanceTestResult.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters