Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change-Id: I0d65d58195f80f17b179d55947f97547d07673ab Reviewed-on: http://review.couchbase.org/c/testrunner/+/136679 Tested-by: Balakumaran G <balakumaran.gopal@couchbase.com> Reviewed-by: Balakumaran G <balakumaran.gopal@couchbase.com>
- Loading branch information
1 parent
d4ab544
commit 5b5fa22
Showing
6 changed files
with
48 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
function OnUpdate(doc,meta) { | ||
var expiry = new Date(); | ||
expiry.setSeconds(expiry.getSeconds() + 180); | ||
var time_rand = random_gen(); | ||
var doc_id = meta.id+'_'+time_rand; | ||
var context = {docID : doc_id, random_text : "e6cZZGHuh0R7Aumoe6cZZGHuh0R7Aumoe6cZZGHuh0R7Aumoe6cZZGHuh0R7Aumoe6cZZGHuh0R7Aumoe6cZZGHuh0R7Aumoe6cZZGHuh0R7Aumoe6cZZGHuh0R7Aumoe6cZZGHuh0R7Aumoe6cZZGHuh0R7Aumoe6cZZGHuh0R7Aumoe6cZZGHuh0R7Aumoe6cZZGHuh0R7Aumoe6cZZGHuh07Aumoe6cZZGHuh07Aumoe6cZZGHuh07Aumoe6"}; | ||
createTimer(DocTimerCallback, expiry, meta.id, context); | ||
} | ||
function DocTimerCallback(context) { | ||
var result= couchbase.insert(dst_bucket,{"id":context.docID},context.random_text); | ||
log(result); | ||
} | ||
function random_gen(){ | ||
var rand = Math.floor(Math.random() * 20000000) * Math.floor(Math.random() * 20000000); | ||
var time_rand = Math.round((new Date()).getTime() / 1000) + rand; | ||
return time_rand; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters