BewareMyPower commented on code in PR #288:
URL: 
https://github.com/apache/pulsar-client-node/pull/288#discussion_r1072120707


##########
tests/docker-load-test.sh:
##########
@@ -0,0 +1,35 @@
+#!/bin/bash
+#
+# 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.
+#
+
+# NOTE: This script should only run inside a Node.js docker container.
+# See ./load-test.sh for details.
+set -ex
+
+# Create an empty directory to test
+mkdir -p /app && cd /app
+tar zxf /pulsar-client-node/pulsar-client-node.tar.gz
+cp /pulsar-client-node/build/Release/Pulsar.node .

Review Comment:
   No. If we're doing this way, we need to run `npm install` to install these 
dependencies: 
https://github.com/apache/pulsar-client-node/blob/dc2c3c5feb1d51e317215ae183ccf0a1b7306353/package.json#L55-L57
   
   And `npm install` might build the `Pulsar.node` again on the test docker 
image, so the `Pulsar.node` built on CentOS 7 might be overwritten.
   
   Actually, IMO these dependencies should not be required. A C++ Add-on should 
be required directly in the scripts under `src/` and `index.js`. I'm not sure 
if there is a way to move them from `dependencies` to `devDependencies`. But 
this script is just for tests and they are equivalent.



-- 
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]

Reply via email to