ProcessTestData processes test data through the input component's normal data flow This ensures test data goes through the same processing as production data
(data map[string]interface{})
| 547 | // ProcessTestData processes test data through the input component's normal data flow |
| 548 | // This ensures test data goes through the same processing as production data |
| 549 | func (in *Input) ProcessTestData(data map[string]interface{}) { |
| 550 | // Only increment total count - same as production logic |
| 551 | atomic.AddUint64(&in.consumeTotal, 1) |
| 552 | |
| 553 | // Skip sampling in testing mode - not needed for test scenarios |
| 554 | |
| 555 | in.dispatchMessage(in.prepareMessage(data)) |
| 556 | |
| 557 | logger.Debug("Test data processed through input", "input", in.Id, "downstream_count", in.DownstreamCount()) |
| 558 | } |
| 559 | |
| 560 | func (in *Input) prepareMessage(msg map[string]interface{}) map[string]interface{} { |
| 561 | if msg == nil { |
no test coverage detected