From 63130410255537c83ae3496863cacae4a316478e Mon Sep 17 00:00:00 2001 From: jatchili Date: Mon, 8 Apr 2013 16:05:11 -0700 Subject: [PATCH] Disable verbosity by default in account_tx-test.js (still commented out) --- test/account_tx-test.js | 30 +++++++++++++----------------- 1 file changed, 13 insertions(+), 17 deletions(-) diff --git a/test/account_tx-test.js b/test/account_tx-test.js index eac59b6ac1..7ab54ef76a 100644 --- a/test/account_tx-test.js +++ b/test/account_tx-test.js @@ -10,7 +10,7 @@ var testutils = require("./testutils"); require('../src/js/config').load(require('./config')); -buster.testRunner.timeout = 250000; //This is a very long test! +buster.testRunner.timeout = 350000; //This is a very long test! // Hard-coded limits we'll be testing: @@ -23,8 +23,9 @@ var OFFSET = 180; var LIMIT = 170; var SECOND_BATCH = 10; // Between NONBINARY_LIMIT and BINARY_LIMIT var THIRD_BATCH = 295; // Exceeds both limits +var VERBOSE = false; -buster.testCase("// Account_tx tests LITTERS OUTPUT", { +buster.testCase("//Account_tx tests", { 'setUp' : testutils.build_setup(), 'tearDown' : testutils.build_teardown(), @@ -40,17 +41,17 @@ buster.testCase("// Account_tx tests LITTERS OUTPUT", { .offer_create("root", "500", "100/USD/root") .on('proposed', function (m) { transactionCounter++; - console.log('Submitted transaction', transactionCounter); + if (VERBOSE) console.log('Submitted transaction', transactionCounter); callback(m.result !== 'tesSUCCESS'); }) .on('final', function (m) { f++; - console.log("Finalized transaction", f); + if (VERBOSE) console.log("Finalized transaction", f); buster.assert.equals('tesSUCCESS', m.metadata.TransactionResult); buster.assert(final_create); if ( f == transactionCounter ) { - console.log("All transactions have been finalized."); + if (VERBOSE) console.log("All transactions have been finalized."); functionHolder(); } }) @@ -64,7 +65,7 @@ buster.testCase("// Account_tx tests LITTERS OUTPUT", { } functionHolder = whenDone; //lolwut async.parallel(bunchOfOffers, function (error) { - console.log("Accepting ledger."); + if (VERBOSE) console.log("Accepting ledger."); buster.refute(error); self.remote .once('ledger_closed', function (message) { @@ -101,18 +102,18 @@ buster.testCase("// Account_tx tests LITTERS OUTPUT", { function standardErrorHandler(callback) { return function(r) { - console.log("ERROR!"); - console.log(r); + if (VERBOSE) console.log("ERROR!"); + if (VERBOSE) console.log(r); callback(r); } } function runTests(self, actualNumberOfTransactions, offset, limit, finalCallback) { - console.log("Testing batch with offset and limit:", offset, limit); + if (VERBOSE) console.log("Testing batch with offset and limit:", offset, limit); async.series([ function(callback) { - console.log('nonbinary'); + if (VERBOSE) console.log('nonbinary'); self.remote.request_account_tx({ account:ACCOUNT, ledger_index_min:-1, @@ -120,7 +121,6 @@ buster.testCase("// Account_tx tests LITTERS OUTPUT", { offset:offset, limit:limit }).on('success', function (r) { - //console.log("GOT STUFF!",r); if (r.transactions) { var targetLength = Math.min(NONBINARY_LIMIT, limit ? Math.min(limit,actualNumberOfTransactions-offset) : actualNumberOfTransactions-offset); buster.assert(r.transactions.length == targetLength, "Got "+r.transactions.length+" transactions; expected "+targetLength ); @@ -128,8 +128,6 @@ buster.testCase("// Account_tx tests LITTERS OUTPUT", { for (var i=0; i