Files
cleveragents-core/tests/features/stream_router_advanced.feature

93 lines
2.9 KiB
Gherkin

Feature: Advanced Stream Router Testing
As a developer
I want to test advanced functionality in the stream router module
So that we achieve maximum code coverage for complex operators
Background:
Given the CleverAgents reactive system is available
Scenario: Test buffer with time parameter
Given I have a stream configuration with time-based buffer:
"""
{
"name": "time_buffer_test",
"type": "cold",
"operators": [
{
"type": "buffer",
"params": {
"time": 0.1
}
}
]
}
"""
When I create the reactive stream
Then the stream should be created successfully
Scenario: Test accumulator operations directly
Given I have a stream configuration for accumulator testing:
"""
{
"name": "accumulator_test",
"type": "cold",
"operators": [
{
"type": "scan",
"params": {
"accumulator": {
"type": "sum"
}
}
}
]
}
"""
When I create the reactive stream
And I test the accumulator with numeric values
Then the accumulator should process correctly
Scenario: Test condition evaluations directly
Given I have a stream for condition testing
When I test all condition types directly
Then all conditions should evaluate correctly
Scenario: Test transform operations directly
Given I have a stream for transform testing
When I test all transform types directly
Then all transforms should apply correctly
Scenario: Test error handling with real errors
Given I have a stream for error testing
When I trigger actual stream errors
Then the errors should be handled properly
Scenario: Test agent mapper with tool agent having tools
Given I have a tool agent with actual tools
When I test the agent mapper directly
Then the tool agent should be processed correctly
Scenario: Test builtin function mapping
Given I have a stream with builtin function mapping
When I test builtin function calls
Then the builtin functions should execute
Scenario: Test stream disposal with hasattr check
Given I have streams with different disposal methods
When I dispose all streams
Then disposal should handle different stream types
Scenario: Test merge with input stream creation
Given I need to test input stream creation
When I merge with input stream handling
Then input stream should be created properly
Scenario: Test split stream error conditions
Given I have streams for split testing
When I test split with error conditions
Then split errors should be handled correctly
Scenario: Test message send with loop time
Given I have a stream for message timing
When I send messages with timing checks
Then timestamps should be set correctly