@@ -63,27 +63,27 @@ func BuildTestImpressionEvent() UserEvent {
63
63
variation .Key = "variation_a"
64
64
variation .ID = "15410990633"
65
65
66
- logEvent := CreateImpressionUserEvent (context , experiment , variation , userContext )
66
+ impressionUserEvent := CreateImpressionUserEvent (context , experiment , variation , userContext )
67
67
68
- return logEvent
68
+ return impressionUserEvent
69
69
}
70
70
71
71
func BuildTestConversionEvent () UserEvent {
72
72
config := TestConfig {}
73
73
context := CreateEventContext (config .GetProjectID (), config .GetRevision (), config .GetAccountID (), config .GetAnonymizeIP (), config .GetBotFiltering (), make (map [string ]string ))
74
74
75
- logEvent := CreateConversionUserEvent (context , entities.Event {ExperimentIds : []string {"15402980349" }, ID : "15368860886" , Key : "sample_conversion" }, userContext ,make (map [string ]string ), make (map [string ]interface {}))
75
+ conversionUserEvent := CreateConversionUserEvent (context , entities.Event {ExperimentIds : []string {"15402980349" }, ID : "15368860886" , Key : "sample_conversion" }, userContext ,make (map [string ]string ), make (map [string ]interface {}))
76
76
77
- return logEvent
77
+ return conversionUserEvent
78
78
}
79
79
80
80
func TestCreateAndSendImpressionEvent (t * testing.T ) {
81
81
82
- logEvent := BuildTestImpressionEvent ()
82
+ impressionUserEvent := BuildTestImpressionEvent ()
83
83
84
84
processor := NewEventProcessor (100 , 100 )
85
85
86
- processor .ProcessImpression ( logEvent )
86
+ processor .ProcessEvent ( impressionUserEvent )
87
87
88
88
result , ok := processor .(* QueueingEventProcessor )
89
89
@@ -98,11 +98,11 @@ func TestCreateAndSendImpressionEvent(t *testing.T) {
98
98
99
99
func TestCreateAndSendConversionEvent (t * testing.T ) {
100
100
101
- logEvent := BuildTestConversionEvent ()
101
+ conversionUserEvent := BuildTestConversionEvent ()
102
102
103
103
processor := NewEventProcessor (100 , 100 )
104
104
105
- processor .ProcessImpression ( logEvent )
105
+ processor .ProcessEvent ( conversionUserEvent )
106
106
107
107
result , ok := processor .(* QueueingEventProcessor )
108
108
@@ -120,12 +120,12 @@ func TestCreateConversionEventRevenue(t *testing.T) {
120
120
config := TestConfig {}
121
121
context := CreateEventContext (config .GetProjectID (), config .GetRevision (), config .GetAccountID (), config .GetAnonymizeIP (), config .GetBotFiltering (), make (map [string ]string ))
122
122
123
- logEvent := CreateConversionUserEvent (context , entities.Event {ExperimentIds : []string {"15402980349" }, ID : "15368860886" , Key : "sample_conversion" }, userContext ,make (map [string ]string ), eventTags )
123
+ conversionUserEvent := CreateConversionUserEvent (context , entities.Event {ExperimentIds : []string {"15402980349" }, ID : "15368860886" , Key : "sample_conversion" }, userContext ,make (map [string ]string ), eventTags )
124
124
125
- assert .Equal (t , int64 (55 ), * logEvent .Conversion .Revenue )
126
- assert .Equal (t , 25.1 , * logEvent .Conversion .Value )
125
+ assert .Equal (t , int64 (55 ), * conversionUserEvent .Conversion .Revenue )
126
+ assert .Equal (t , 25.1 , * conversionUserEvent .Conversion .Value )
127
127
128
- batch := createConversionBatchEvent (logEvent )
128
+ batch := createConversionBatchEvent (conversionUserEvent )
129
129
assert .Equal (t , int64 (55 ), * batch .Visitors [0 ].Snapshots [0 ].Events [0 ].Revenue )
130
130
assert .Equal (t , 25.1 , * batch .Visitors [0 ].Snapshots [0 ].Events [0 ].Value )
131
131
0 commit comments