From 07d2703e6959477acc968d17d0f9595842f80ed1 Mon Sep 17 00:00:00 2001 From: "J. Brisbin" Date: Mon, 29 Nov 2010 13:38:23 -0600 Subject: [PATCH] Tweak M/R tests --- .../data/riak/core/RiakTemplateSpec.groovy | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/spring-data-riak/src/test/groovy/org/springframework/data/riak/core/RiakTemplateSpec.groovy b/spring-data-riak/src/test/groovy/org/springframework/data/riak/core/RiakTemplateSpec.groovy index 749c8022d..398ee80d0 100644 --- a/spring-data-riak/src/test/groovy/org/springframework/data/riak/core/RiakTemplateSpec.groovy +++ b/spring-data-riak/src/test/groovy/org/springframework/data/riak/core/RiakTemplateSpec.groovy @@ -182,15 +182,16 @@ class RiakTemplateSpec extends Specification { given: MapReduceJob job = riak.createMapReduceJob() - def mapJs = new JavascriptMapReduceOperation("function(v){ return [1]; }") + def mapJs = new JavascriptMapReduceOperation("function(m){ return [1]; }") def mapPhase = new RiakMapReducePhase("map", "javascript", mapJs) - def reduceJs = new JavascriptMapReduceOperation("function(v){ return [v.length]; }") + def reduceJs = new JavascriptMapReduceOperation("function(r){ return [1]; }") def reducePhase = new RiakMapReducePhase("reduce", "javascript", reduceJs) job.addInputs(["test"]). addPhase(mapPhase). addPhase(reducePhase) + println job.toJson() when: def result = riak.execute(job, Integer) @@ -204,10 +205,10 @@ class RiakTemplateSpec extends Specification { given: MapReduceJob job = riak.createMapReduceJob() - def mapJs = new JavascriptMapReduceOperation("function(v){ return [1]; }") + def mapJs = new JavascriptMapReduceOperation("function(m){ return [1]; }") def mapPhase = new RiakMapReducePhase("map", "javascript", mapJs) - def reduceJs = new JavascriptMapReduceOperation("function(v){ return [v.length]; }") + def reduceJs = new JavascriptMapReduceOperation("function(r){ return [1]; }") def reducePhase = new RiakMapReducePhase("reduce", "javascript", reduceJs) job.addInputs(["test"]).