diff --git a/src/qlever/commands/index.py b/src/qlever/commands/index.py index 0d1b0b40..eb2fab8d 100644 --- a/src/qlever/commands/index.py +++ b/src/qlever/commands/index.py @@ -236,9 +236,9 @@ def execute(self, args) -> bool: # large number of open files is allowed). total_file_size = get_total_file_size(shlex.split(args.input_files)) if args.ulimit is not None: - index_cmd = f"ulimit -Sn {args.ulimit}; {index_cmd}" + index_cmd = f"ulimit -Sn {args.ulimit} && {index_cmd}" elif total_file_size > 1e10: - index_cmd = f"ulimit -Sn 1048576; {index_cmd}" + index_cmd = f"ulimit -Sn 500000 && {index_cmd}" # Run the command in a container (if so desired). if args.system in Containerize.supported_systems(): diff --git a/test/qlever/commands/test_index_execute.py b/test/qlever/commands/test_index_execute.py index e8004fff..3d4b3b82 100644 --- a/test/qlever/commands/test_index_execute.py +++ b/test/qlever/commands/test_index_execute.py @@ -256,7 +256,7 @@ def test_execute_total_file_size_greater_than_ten_gb( # Assertions expected_index_cmd = ( - f"ulimit -Sn 1048576; {args.cat_input_files} | {args.index_binary}" + f"ulimit -Sn 500000 && {args.cat_input_files} | {args.index_binary}" f" -i {args.name} -s {args.name}.settings.json" f" -F {args.format} -f -" f" | tee {args.name}.index-log.txt"