Skip to content

Commit

Permalink
Fix cpplint issues in test.py
Browse files Browse the repository at this point in the history
  • Loading branch information
muthumala19 committed Dec 31, 2024
1 parent a8782c2 commit 9833128
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 9 deletions.
3 changes: 1 addition & 2 deletions src/frontend/JasmineGraphFrontEnd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1393,7 +1393,6 @@ void addStreamHDFSCommand(std::string masterIP, int connFd, std::string &hdfsSer
read(connFd, isDirectedRes, FRONTEND_DATA_LENGTH);
std::string isDirectedS(isDirectedRes);
isDirectedS = Utils::trim_copy(isDirectedS);
/**/

bool directed;
if (isDirectedS == "y") {
Expand All @@ -1402,7 +1401,7 @@ void addStreamHDFSCommand(std::string masterIP, int connFd, std::string &hdfsSer
directed = false;
}

std::string path = "hdfs:\\" + hdfsFilePathS;
std::string path = "hdfs:" + hdfsFilePathS;

std::time_t time = std::chrono::system_clock::to_time_t(std::chrono::system_clock::now());
std::string uploadStartTime = ctime(&time);
Expand Down
21 changes: 14 additions & 7 deletions tests/integration/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,30 +201,37 @@ def test(host, port):
# 1.for default hdfs server: 10.8.100.246
print()
logging.info('Testing adhdfs for default HDFS server')
send_and_expect_response(sock, 'adhdfs', ADHDFS, b'Do you want to use the default HDFS server(y/n)?',
send_and_expect_response(sock, 'adhdfs', ADHDFS,
b'Do you want to use the default HDFS server(y/n)?',
exit_on_failure=True)
send_and_expect_response(sock, 'adhdfs', b'y', b'HDFS file path: ', exit_on_failure=True)
send_and_expect_response(sock, 'adhdfs', b'/home/data/powergrid.dl', b'Is this a directed graph(y/n)?',
send_and_expect_response(sock, 'adhdfs', b'/home/data/powergrid.dl',
b'Is this a directed graph(y/n)?',
exit_on_failure=True)
send_and_expect_response(sock, 'adhdfs', b'y', DONE, exit_on_failure=True)

# 2. for custom hdfs server
print()
logging.info('Testing adhdfs for custom HDFS server')
send_and_expect_response(sock, 'adhdfs', ADHDFS, b'Do you want to use the default HDFS server(y/n)?',
send_and_expect_response(sock, 'adhdfs', ADHDFS,
b'Do you want to use the default HDFS server(y/n)?',
exit_on_failure=True)
send_and_expect_response(sock, 'adhdfs', b'n', b'Send the file path to the HDFS configuration file.',
send_and_expect_response(sock, 'adhdfs', b'n',
b'Send the file path to the HDFS configuration file.',
exit_on_failure=True)
send_and_expect_response(sock, 'adhdfs', b'/var/tmp/hdfs/hdfs_config.txt', b'HDFS file path: ',
send_and_expect_response(sock, 'adhdfs', b'/var/tmp/hdfs/hdfs_config.txt',
b'HDFS file path: ',
exit_on_failure=True)
send_and_expect_response(sock, 'adhdfs', b'/home/powergrid.dl', b'Is this a directed graph(y/n)?',
send_and_expect_response(sock, 'adhdfs', b'/home/powergrid.dl',
b'Is this a directed graph(y/n)?',
exit_on_failure=True)
send_and_expect_response(sock, 'adhdfs', b'y', DONE, exit_on_failure=True)

print()
logging.info('Testing lst after adhdfs')
send_and_expect_response(sock, 'lst after adhdfs', LIST,
b'|1|/home/data/powergrid.dl|hdfs:\/home/data/powergrid.dl|op|' + LINE_END + b'|2|/home/powergrid.dl|hdfs:\/home/powergrid.dl|op|',
b'|1|/home/data/powergrid.dl|hdfs:/home/data/powergrid.dl|op|' + LINE_END +
b'|2|/home/powergrid.dl|hdfs:/home/powergrid.dl|op|',
exit_on_failure=True)

print()
Expand Down

0 comments on commit 9833128

Please sign in to comment.