@@ -381,7 +381,7 @@ describe('lib/core/decision_service', function() {
381
381
) ;
382
382
assert . strictEqual (
383
383
buildLogMessageFromArgs ( mockLogger . log . args [ 4 ] ) ,
384
- 'DECISION_SERVICE: Saved variation "control" of experiment "testExperiment" for user "decision_service_user".'
384
+ 'DECISION_SERVICE: Saved user profile for user "decision_service_user".'
385
385
) ;
386
386
} ) ;
387
387
@@ -394,6 +394,7 @@ describe('lib/core/decision_service', function() {
394
394
optimizely : { } ,
395
395
userId : 'decision_service_user' ,
396
396
} ) ;
397
+
397
398
assert . strictEqual (
398
399
'control' ,
399
400
decisionServiceInstance . getVariation ( configObj , experiment , user ) . result
@@ -402,11 +403,11 @@ describe('lib/core/decision_service', function() {
402
403
sinon . assert . calledOnce ( bucketerStub ) ; // should still go through with bucketing
403
404
assert . strictEqual (
404
405
buildLogMessageFromArgs ( mockLogger . log . args [ 0 ] ) ,
405
- 'DECISION_SERVICE: User decision_service_user is not in the forced variation map .'
406
+ 'DECISION_SERVICE: Error while looking up user profile for user ID "decision_service_user": I am an error .'
406
407
) ;
407
408
assert . strictEqual (
408
409
buildLogMessageFromArgs ( mockLogger . log . args [ 1 ] ) ,
409
- 'DECISION_SERVICE: Error while looking up user profile for user ID "decision_service_user": I am an error .'
410
+ 'DECISION_SERVICE: User decision_service_user is not in the forced variation map .'
410
411
) ;
411
412
} ) ;
412
413
@@ -1281,7 +1282,7 @@ describe('lib/core/decision_service', function() {
1281
1282
reasons : [ ] ,
1282
1283
} ;
1283
1284
experiment = configObj . experimentIdMap [ '594098' ] ;
1284
- getVariationStub = sandbox . stub ( decisionServiceInstance , 'getVariation ' ) ;
1285
+ getVariationStub = sandbox . stub ( decisionServiceInstance , 'resolveVariation ' ) ;
1285
1286
getVariationStub . returns ( fakeDecisionResponse ) ;
1286
1287
getVariationStub . withArgs ( configObj , experiment , user ) . returns ( fakeDecisionResponseWithArgs ) ;
1287
1288
} ) ;
@@ -1497,12 +1498,11 @@ describe('lib/core/decision_service', function() {
1497
1498
decisionSource : DECISION_SOURCES . FEATURE_TEST ,
1498
1499
} ;
1499
1500
assert . deepEqual ( decision , expectedDecision ) ;
1500
- sinon . assert . calledWithExactly (
1501
+ sinon . assert . calledWith (
1501
1502
getVariationStub ,
1502
1503
configObj ,
1503
1504
experiment ,
1504
1505
user ,
1505
- { }
1506
1506
) ;
1507
1507
} ) ;
1508
1508
} ) ;
@@ -1515,7 +1515,7 @@ describe('lib/core/decision_service', function() {
1515
1515
optimizely : { } ,
1516
1516
userId : 'user1' ,
1517
1517
} ) ;
1518
- getVariationStub = sandbox . stub ( decisionServiceInstance , 'getVariation ' ) ;
1518
+ getVariationStub = sandbox . stub ( decisionServiceInstance , 'resolveVariation ' ) ;
1519
1519
getVariationStub . returns ( fakeDecisionResponse ) ;
1520
1520
} ) ;
1521
1521
@@ -1554,7 +1554,7 @@ describe('lib/core/decision_service', function() {
1554
1554
result : 'var' ,
1555
1555
reasons : [ ] ,
1556
1556
} ;
1557
- getVariationStub = sandbox . stub ( decisionServiceInstance , 'getVariation ' ) ;
1557
+ getVariationStub = sandbox . stub ( decisionServiceInstance , 'resolveVariation ' ) ;
1558
1558
getVariationStub . returns ( fakeDecisionResponseWithArgs ) ;
1559
1559
getVariationStub . withArgs ( configObj , 'exp_with_group' , user ) . returns ( fakeDecisionResponseWithArgs ) ;
1560
1560
} ) ;
@@ -1611,7 +1611,7 @@ describe('lib/core/decision_service', function() {
1611
1611
optimizely : { } ,
1612
1612
userId : 'user1' ,
1613
1613
} ) ;
1614
- getVariationStub = sandbox . stub ( decisionServiceInstance , 'getVariation ' ) ;
1614
+ getVariationStub = sandbox . stub ( decisionServiceInstance , 'resolveVariation ' ) ;
1615
1615
getVariationStub . returns ( fakeDecisionResponse ) ;
1616
1616
} ) ;
1617
1617
@@ -1679,6 +1679,7 @@ describe('lib/core/decision_service', function() {
1679
1679
status : 'Not started' ,
1680
1680
key : '594031' ,
1681
1681
id : '594031' ,
1682
+ isRollout : true ,
1682
1683
variations : [
1683
1684
{
1684
1685
id : '594032' ,
@@ -1816,6 +1817,7 @@ describe('lib/core/decision_service', function() {
1816
1817
status : 'Not started' ,
1817
1818
key : '594037' ,
1818
1819
id : '594037' ,
1820
+ isRollout : true ,
1819
1821
variations : [
1820
1822
{
1821
1823
id : '594038' ,
@@ -2000,6 +2002,7 @@ describe('lib/core/decision_service', function() {
2000
2002
status : 'Not started' ,
2001
2003
key : '594037' ,
2002
2004
id : '594037' ,
2005
+ isRollout : true ,
2003
2006
variations : [
2004
2007
{
2005
2008
id : '594038' ,
@@ -2154,6 +2157,7 @@ describe('lib/core/decision_service', function() {
2154
2157
layerId : '599055' ,
2155
2158
forcedVariations : { } ,
2156
2159
audienceIds : [ ] ,
2160
+ isRollout : true ,
2157
2161
variations : [
2158
2162
{
2159
2163
key : '599057' ,
0 commit comments