From e1bfa1e42458c8ececd386d532b7f573da717fcc Mon Sep 17 00:00:00 2001 From: Philip Frank Date: Wed, 7 Mar 2018 18:01:56 +0100 Subject: [PATCH] THRIFT-4509: remove nodejs browser test --- lib/nodejs/test/browser_client.js | 45 ------------------------------- lib/nodejs/test/testAll.sh | 14 ---------- package.json | 2 -- 3 files changed, 61 deletions(-) delete mode 100644 lib/nodejs/test/browser_client.js diff --git a/lib/nodejs/test/browser_client.js b/lib/nodejs/test/browser_client.js deleted file mode 100644 index 72fd8375bb1..00000000000 --- a/lib/nodejs/test/browser_client.js +++ /dev/null @@ -1,45 +0,0 @@ -/* - * 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. - */ - -var assert = require('assert'); -var thrift = require('thrift'); -var helpers = require('./helpers'); -var ThriftTest = require('./gen-nodejs/ThriftTest'); -var ThriftTestDriver = require('./test_driver').ThriftTestDriver; - -// createXHRConnection createWSConnection -var connection = thrift.createXHRConnection("localhost", 9090, { - transport: helpers.transports['buffered'], - protocol: helpers.protocols['json'], - path: '/test' -}); - -connection.on('error', function(err) { - assert(false, err); -}); - -// Uncomment the following line to start a websockets connection -// connection.open(); - -// createWSClient createXHRClient -var client = thrift.createXHRClient(ThriftTest, connection); - -ThriftTestDriver(client, function (status) { - console.log('Browser:', status); -}); diff --git a/lib/nodejs/test/testAll.sh b/lib/nodejs/test/testAll.sh index aae451a4810..ac22b64e82b 100755 --- a/lib/nodejs/test/testAll.sh +++ b/lib/nodejs/test/testAll.sh @@ -24,7 +24,6 @@ fi DIR="$( cd "$( dirname "$0" )" && pwd )" ISTANBUL="$DIR/../../../node_modules/istanbul/lib/cli.js" -RUNBROWSER="$DIR/../../../node_modules/run-browser/bin/cli.js" REPORT_PREFIX="${DIR}/../coverage/report" @@ -55,17 +54,6 @@ testServer() return $RET } -testBrowser() -{ - echo " Testing browser client with http server with json protocol and buffered transport"; - RET=0 - node ${DIR}/server.js --type http -p json -t buffered & - SERVERPID=$! - sleep 1 - ${RUNBROWSER} ${DIR}/browser_client.js --phantom || RET=1 - kill -2 $SERVERPID || RET=1 - return $RET -} TESTOK=0 @@ -96,8 +84,6 @@ do done done -# XHR only until phantomjs 2 is released. -# testBrowser if [ -n "${COVER}" ]; then ${ISTANBUL} report --dir "${DIR}/../coverage" --include "${DIR}/../coverage/report*/coverage.json" lcov cobertura html diff --git a/package.json b/package.json index 11e76a2145a..b03fc575826 100644 --- a/package.json +++ b/package.json @@ -45,9 +45,7 @@ "connect": "^3.6.6", "istanbul": "^0.4.5", "jsdoc": "^3.5.5", - "minimatch": "^3.0.4", "phantomjs-prebuilt": "^2.1.16", - "run-browser": "^2.0.2", "tape": "^4.9.0", "utf-8-validate": "^4.0.0" },