frankgh commented on code in PR #126:
URL: https://github.com/apache/cassandra-sidecar/pull/126#discussion_r1635567453
##########
gradlew:
##########
@@ -105,8 +105,10 @@ if [ "$cygwin" = "false" -a "$darwin" = "false" -a
"$nonstop" = "false" ] ; then
fi
# For Darwin, add options to specify how the application appears in the dock
+# In addition, we want to disable the MaxFDLimit for MacOS, which is set to a
lower limit than the actual system maximum.
Review Comment:
```suggestion
# In addition, we want to increase the file descriptor limit to the
MaxFDLimit in MacOS which, by default, is set to a lower limit than the actual
system's maximum.
```
##########
vertx-client-shaded/build.gradle:
##########
@@ -83,6 +83,8 @@ shadowJar {
}
}
+test.dependsOn shadowJar
Review Comment:
thanks for fixing this dependency! I have a small NIT:
```suggestion
tasks.named('test') {
dependsOn 'shadowJar'
}
```
##########
src/test/java/org/apache/cassandra/sidecar/UlimitTest.java:
##########
@@ -0,0 +1,44 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.cassandra.sidecar;
+
+import java.io.BufferedReader;
+import java.io.InputStreamReader;
+
+import org.junit.jupiter.api.Test;
+
+import static org.assertj.core.api.Assertions.assertThat;
+
+public class UlimitTest
+{
+ @Test
+ void ensureUlimitMaxFilesIsNotTooLow() throws Exception
+ {
+ Process p = new ProcessBuilder("ulimit", "-n").start();
+ p.waitFor();
+ InputStreamReader inputStreamReader = new
InputStreamReader(p.getInputStream());
+ BufferedReader reader = new BufferedReader(inputStreamReader);
+ String line = reader.readLine();
+ long maxFD = Long.parseLong(line);
+ System.out.println(maxFD);
+ assertThat(maxFD).isGreaterThan(10240);
Review Comment:
will this always be true? also, can we scope this test to macOS ?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]