[Pkg-mozext-commits] [perspectives-extension] 10/22: Pers_client_policy - Fix return value for get_quorum_duration

David Prévot taffit at moszumanska.debian.org
Mon May 12 17:17:43 UTC 2014


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch debian
in repository perspectives-extension.

commit 2661d8b9403f6751c805f1cc4ddf3b40b4ddd63f
Author: Dave Schaefer <dave.schaefer at gmail.com>
Date:   Mon May 5 21:49:04 2014 -0600

    Pers_client_policy - Fix return value for get_quorum_duration
    
    Function should always return a number, not true/false.
    Fix the corresponding test to properly catch this.
---
 plugin/chrome/content/client_policy.js | 2 +-
 test/test.html                         | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/plugin/chrome/content/client_policy.js b/plugin/chrome/content/client_policy.js
index ecea72d..618ef03 100644
--- a/plugin/chrome/content/client_policy.js
+++ b/plugin/chrome/content/client_policy.js
@@ -166,7 +166,7 @@ get_quorum_duration : function(test_key, results, quorum_size, stale_limit_secs,
 
 	if (quorum_size < 1) {
 		Pers_debug.d_print("error", "ERROR: quorum size cannot be less than 1.");
-		return false;
+		return 0;
 	}
 
 	if(! Pers_client_policy.check_current_consistency(test_key,results,quorum_size,
diff --git a/test/test.html b/test/test.html
index e27f1e0..1a7b24c 100644
--- a/test/test.html
+++ b/test/test.html
@@ -592,7 +592,7 @@ JaJ2Lw7kRVMCAwEAAQ==\
 
   quorum_duration = Pers_client_policy.get_quorum_duration(key,
           server_result_list, 0, max_stale_sec, unixtime);
-  assert((quorum_duration == 0), "Quorum size 0 gives zero duration");
+  assert((quorum_duration === 0), "Quorum size 0 gives zero duration");
 
 
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/perspectives-extension.git



More information about the Pkg-mozext-commits mailing list