Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parse data from TRSS url #579

Merged
merged 1 commit into from
Jul 23, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion src/org/testKitGen/TestDivider.java
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,15 @@ private Map<String, Integer> getDataFromTRSS() {
String level = getLevel();
Map<String, Integer> map = new HashMap<String, Integer>();
String URL = constructURL(impl, plat, group, level);
String command = "curl --silent --max-time 120 -L " + URL;
String osName = System.getProperty("os.name").toLowerCase();
String command;

if (osName.contains("win")) {
command = "cmd.exe /c curl --silent --max-time 120 -L -k \"" + URL + "\"";
} else {
command = "curl --silent --max-time 120 -L -k " + URL;
}
Copy link
Contributor

@llxia llxia Jul 22, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A file is suggested to debug the problem. We should try to avoid using it in the fix if possible.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have removed the use of the file response.json in the code as suggested.
Grinder links:
TARGET: sanity.functional
mac:
42294
win:
42295
aarch64_linux:
#42296
s390x_linux:
#42292

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @annaibm . It looks like the fix is to add quotes around URL. Do we need the following changes (L244 - L319)?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have removed changes from (L244 - L319) . The fix for constructing the curl command based on the operating system . Added quotes around the URL for Windows, while no quotes are used for Linux. Also added the -k option in the curl command.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


System.out.println("Attempting to get test duration data from TRSS.");
System.out.println(command);
Process process;
Expand Down