Skip to content

Commit ebcb1cc

Browse files
authoredMar 3, 2025··
Bugfix: rename the video name when test device count is 1 (#659)
<!-- Please provide brief information about the PR, what it contains & its purpose, new behaviors after the change. And let us know here if you need any help: https://github.com/microsoft/HydraLab/issues/new --> ## Description <!-- A few words to explain your changes --> ### Linked GitHub issue ID: # ## Pull Request Checklist <!-- Put an x in the boxes that apply. This is simply a reminder of what we are going to look for before merging your code. --> - [ ] Tests for the changes have been added (for bug fixes / features) - [x] Code compiles correctly with all tests are passed. - [x] I've read the [contributing guide](https://github.com/microsoft/HydraLab/blob/main/CONTRIBUTING.md#making-changes-to-the-code) and followed the recommended practices. - [ ] [Wikis](https://github.com/microsoft/HydraLab/wiki) or [README](https://github.com/microsoft/HydraLab/blob/main/README.md) have been reviewed and added / updated if needed (for bug fixes / features) ### Does this introduce a breaking change? *If this introduces a breaking change for Hydra Lab users, please describe the impact and migration path.* - [ ] Yes - [x] No ## How you tested it *Please make sure the change is tested, you can test it by adding UTs, do local test and share the screenshots, etc.* Please check the type of change your PR introduces: - [x] Bugfix - [ ] Feature - [ ] Technical design - [ ] Build related changes - [ ] Refactoring (no functional changes, no api changes) - [ ] Code style update (formatting, renaming) or Documentation content changes - [ ] Other (please describe): ### Feature UI screenshots or Technical design diagrams *If this is a relatively large or complex change, kick it off by drawing the tech design with PlantUML and explaining why you chose the solution you did and what alternatives you considered, etc...*
1 parent 1db39ae commit ebcb1cc

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed
 

‎agent/src/main/java/com/microsoft/hydralab/agent/runner/TestRunDeviceOrchestrator.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -128,18 +128,18 @@ public void startScreenRecorder(@NotNull TestRunDevice testRunDevice, @NotNull F
128128
}
129129

130130
public String stopScreenRecorder(@NotNull TestRunDevice testRunDevice, @NotNull File folder, @Nullable Logger logger) {
131+
List<String> videoFilePaths = new ArrayList<>();
131132
if (testRunDevice instanceof TestRunDeviceCombo) {
132-
List<String> videoFilePaths = new ArrayList<>();
133133
((TestRunDeviceCombo) testRunDevice).getDevices().forEach(testRunDevice1 -> {
134134
String path = testRunDevice1.getScreenRecorder().finishRecording();
135135
if (path != null && !path.isEmpty()) {
136136
videoFilePaths.add(path);
137137
}
138138
});
139-
return FFmpegConcatUtil.mergeVideosSideBySide(videoFilePaths, folder, logger).getAbsolutePath();
140139
} else {
141-
return testRunDevice.getScreenRecorder().finishRecording();
140+
videoFilePaths.add(testRunDevice.getScreenRecorder().finishRecording());
142141
}
142+
return FFmpegConcatUtil.mergeVideosSideBySide(videoFilePaths, folder, logger).getAbsolutePath();
143143
}
144144

145145
public void startNetworkMonitor(@NotNull TestRunDevice testRunDevice, String rule, File resultFolder, @Nullable Logger logger) {

0 commit comments

Comments
 (0)
Please sign in to comment.