@@ -58,6 +58,19 @@ func TestReceiver(t *testing.T) {
58
58
}
59
59
}
60
60
61
+ func TestReceiverSingleton (t * testing.T ) {
62
+ for _ , id := range cIDs {
63
+ r := ReceiverSingleton (id )
64
+ componentKind , ok := r .Attributes ().Value (componentKindKey )
65
+ require .True (t , ok )
66
+ require .Equal (t , component .KindReceiver .String (), componentKind .AsString ())
67
+
68
+ componentID , ok := r .Attributes ().Value (componentIDKey )
69
+ require .True (t , ok )
70
+ require .Equal (t , id .String (), componentID .AsString ())
71
+ }
72
+ }
73
+
61
74
func TestProcessor (t * testing.T ) {
62
75
for _ , pID := range pIDs {
63
76
for _ , id := range cIDs {
@@ -96,6 +109,19 @@ func TestExporter(t *testing.T) {
96
109
}
97
110
}
98
111
112
+ func TestExporterSingleton (t * testing.T ) {
113
+ for _ , id := range cIDs {
114
+ e := ExporterSingleton (id )
115
+ componentKind , ok := e .Attributes ().Value (componentKindKey )
116
+ require .True (t , ok )
117
+ require .Equal (t , component .KindExporter .String (), componentKind .AsString ())
118
+
119
+ componentID , ok := e .Attributes ().Value (componentIDKey )
120
+ require .True (t , ok )
121
+ require .Equal (t , id .String (), componentID .AsString ())
122
+ }
123
+ }
124
+
99
125
func TestConnector (t * testing.T ) {
100
126
for _ , exprSig := range signals {
101
127
for _ , rcvrSig := range signals {
@@ -155,6 +181,12 @@ func createExampleSets() []*Attributes {
155
181
sets = append (sets , Receiver (sig , id ))
156
182
}
157
183
}
184
+ << << << < HEAD
185
+ == == == =
186
+ for _ , id := range cIDs {
187
+ sets = append (sets , ReceiverSingleton (id ))
188
+ }
189
+ >> >> >> > c498d3e44 (Use attributes in loggers )
158
190
159
191
// Processor examples.
160
192
for _ , pID := range pIDs {
@@ -169,6 +201,12 @@ func createExampleSets() []*Attributes {
169
201
sets = append (sets , Exporter (sig , id ))
170
202
}
171
203
}
204
+ << << << < HEAD
205
+ == == == =
206
+ for _ , id := range cIDs {
207
+ sets = append (sets , ExporterSingleton (id ))
208
+ }
209
+ >> >> >> > c498d3e44 (Use attributes in loggers )
172
210
173
211
// Connector examples.
174
212
for _ , exprSig := range signals {
0 commit comments