@@ -29,6 +29,7 @@ func TestCustomPluginConfigApplyConfiguration(t *testing.T) {
29
29
invokeIntervalString := invokeInterval .String ()
30
30
maxOutputLength := 79
31
31
concurrency := 2
32
+ messageChangeBasedConditionUpdate := true
32
33
33
34
ruleTimeout := 1 * time .Second
34
35
ruleTimeoutString := ruleTimeout .String ()
@@ -51,12 +52,13 @@ func TestCustomPluginConfigApplyConfiguration(t *testing.T) {
51
52
},
52
53
Wanted : CustomPluginConfig {
53
54
PluginGlobalConfig : pluginGlobalConfig {
54
- InvokeIntervalString : & defaultInvokeIntervalString ,
55
- InvokeInterval : & defaultInvokeInterval ,
56
- TimeoutString : & defaultGlobalTimeoutString ,
57
- Timeout : & defaultGlobalTimeout ,
58
- MaxOutputLength : & defaultMaxOutputLength ,
59
- Concurrency : & defaultConcurrency ,
55
+ InvokeIntervalString : & defaultInvokeIntervalString ,
56
+ InvokeInterval : & defaultInvokeInterval ,
57
+ TimeoutString : & defaultGlobalTimeoutString ,
58
+ Timeout : & defaultGlobalTimeout ,
59
+ MaxOutputLength : & defaultMaxOutputLength ,
60
+ Concurrency : & defaultConcurrency ,
61
+ EnableMessageChangeBasedConditionUpdate : & defaultMessageChangeBasedConditionUpdate ,
60
62
},
61
63
Rules : []* CustomRule {
62
64
{
@@ -78,12 +80,13 @@ func TestCustomPluginConfigApplyConfiguration(t *testing.T) {
78
80
},
79
81
Wanted : CustomPluginConfig {
80
82
PluginGlobalConfig : pluginGlobalConfig {
81
- InvokeIntervalString : & invokeIntervalString ,
82
- InvokeInterval : & invokeInterval ,
83
- TimeoutString : & defaultGlobalTimeoutString ,
84
- Timeout : & defaultGlobalTimeout ,
85
- MaxOutputLength : & defaultMaxOutputLength ,
86
- Concurrency : & defaultConcurrency ,
83
+ InvokeIntervalString : & invokeIntervalString ,
84
+ InvokeInterval : & invokeInterval ,
85
+ TimeoutString : & defaultGlobalTimeoutString ,
86
+ Timeout : & defaultGlobalTimeout ,
87
+ MaxOutputLength : & defaultMaxOutputLength ,
88
+ Concurrency : & defaultConcurrency ,
89
+ EnableMessageChangeBasedConditionUpdate : & defaultMessageChangeBasedConditionUpdate ,
87
90
},
88
91
},
89
92
},
@@ -95,12 +98,13 @@ func TestCustomPluginConfigApplyConfiguration(t *testing.T) {
95
98
},
96
99
Wanted : CustomPluginConfig {
97
100
PluginGlobalConfig : pluginGlobalConfig {
98
- InvokeIntervalString : & defaultInvokeIntervalString ,
99
- InvokeInterval : & defaultInvokeInterval ,
100
- TimeoutString : & globalTimeoutString ,
101
- Timeout : & globalTimeout ,
102
- MaxOutputLength : & defaultMaxOutputLength ,
103
- Concurrency : & defaultConcurrency ,
101
+ InvokeIntervalString : & defaultInvokeIntervalString ,
102
+ InvokeInterval : & defaultInvokeInterval ,
103
+ TimeoutString : & globalTimeoutString ,
104
+ Timeout : & globalTimeout ,
105
+ MaxOutputLength : & defaultMaxOutputLength ,
106
+ Concurrency : & defaultConcurrency ,
107
+ EnableMessageChangeBasedConditionUpdate : & defaultMessageChangeBasedConditionUpdate ,
104
108
},
105
109
},
106
110
},
@@ -112,12 +116,13 @@ func TestCustomPluginConfigApplyConfiguration(t *testing.T) {
112
116
},
113
117
Wanted : CustomPluginConfig {
114
118
PluginGlobalConfig : pluginGlobalConfig {
115
- InvokeIntervalString : & defaultInvokeIntervalString ,
116
- InvokeInterval : & defaultInvokeInterval ,
117
- TimeoutString : & defaultGlobalTimeoutString ,
118
- Timeout : & defaultGlobalTimeout ,
119
- MaxOutputLength : & maxOutputLength ,
120
- Concurrency : & defaultConcurrency ,
119
+ InvokeIntervalString : & defaultInvokeIntervalString ,
120
+ InvokeInterval : & defaultInvokeInterval ,
121
+ TimeoutString : & defaultGlobalTimeoutString ,
122
+ Timeout : & defaultGlobalTimeout ,
123
+ MaxOutputLength : & maxOutputLength ,
124
+ Concurrency : & defaultConcurrency ,
125
+ EnableMessageChangeBasedConditionUpdate : & defaultMessageChangeBasedConditionUpdate ,
121
126
},
122
127
},
123
128
},
@@ -129,12 +134,31 @@ func TestCustomPluginConfigApplyConfiguration(t *testing.T) {
129
134
},
130
135
Wanted : CustomPluginConfig {
131
136
PluginGlobalConfig : pluginGlobalConfig {
132
- InvokeIntervalString : & defaultInvokeIntervalString ,
133
- InvokeInterval : & defaultInvokeInterval ,
134
- TimeoutString : & defaultGlobalTimeoutString ,
135
- Timeout : & defaultGlobalTimeout ,
136
- MaxOutputLength : & defaultMaxOutputLength ,
137
- Concurrency : & concurrency ,
137
+ InvokeIntervalString : & defaultInvokeIntervalString ,
138
+ InvokeInterval : & defaultInvokeInterval ,
139
+ TimeoutString : & defaultGlobalTimeoutString ,
140
+ Timeout : & defaultGlobalTimeout ,
141
+ MaxOutputLength : & defaultMaxOutputLength ,
142
+ Concurrency : & concurrency ,
143
+ EnableMessageChangeBasedConditionUpdate : & defaultMessageChangeBasedConditionUpdate ,
144
+ },
145
+ },
146
+ },
147
+ "custom message change based condition update" : {
148
+ Orig : CustomPluginConfig {
149
+ PluginGlobalConfig : pluginGlobalConfig {
150
+ EnableMessageChangeBasedConditionUpdate : & messageChangeBasedConditionUpdate ,
151
+ },
152
+ },
153
+ Wanted : CustomPluginConfig {
154
+ PluginGlobalConfig : pluginGlobalConfig {
155
+ InvokeIntervalString : & defaultInvokeIntervalString ,
156
+ InvokeInterval : & defaultInvokeInterval ,
157
+ TimeoutString : & defaultGlobalTimeoutString ,
158
+ Timeout : & defaultGlobalTimeout ,
159
+ MaxOutputLength : & defaultMaxOutputLength ,
160
+ Concurrency : & defaultConcurrency ,
161
+ EnableMessageChangeBasedConditionUpdate : & messageChangeBasedConditionUpdate ,
138
162
},
139
163
},
140
164
},
0 commit comments