components-contrib/tests/certification/pubsub/azure/eventhubs
Bernd Verst 9095b0e7e7
Switch to Go 1.21, Updates linter, updates workflows, adds sarama 1.42.1 (#3251)
Signed-off-by: Bernd Verst <github@bernd.dev>
2023-11-28 18:13:09 -08:00
..
components Certify Azure Event Hubs as Stable in pubsub (#1623) 2022-04-23 23:27:41 -07:00
README.md eh-certification test : Install azure-iot-cli-extension if not found for IOT tests (#1684) 2022-04-24 23:42:50 -07:00
config.yaml Certify Azure Event Hubs as Stable in pubsub (#1623) 2022-04-23 23:27:41 -07:00
delete-eventhub.sh Certify Azure Event Hubs as Stable in pubsub (#1623) 2022-04-23 23:27:41 -07:00
eventhubs_test.go Switch to Go 1.21, Updates linter, updates workflows, adds sarama 1.42.1 (#3251) 2023-11-28 18:13:09 -08:00
send-iot-device-events.sh Tweaks to tests 2023-01-21 00:12:07 +00:00

README.md

Azure Event Hubs Pubsub certification testing

This project aims to test the Azure Event Hubs pubsub component under various conditions.

Test Plan

Pubsub Certification Tests

  • Test partition key, in order processing single publisher/subscriber (done as part of conformance tests)
  • Test single publisher / single subscriber
    • Start an app with 1 publisher and 1 subscriber
    • The publisher publishes to 2 topics
    • The subscriber is subscribed to 1 topic
    • Test: Sends 10+ unique messages
    • App: Simulates periodic errors
    • Component: Retries on error
    • App: Observes successful messages
    • Test: Confirms that all expected messages were received
    • Test: Confirms that subscriber does not receive messages from the non-subscribed topic
  • Test single publisher / multiple subscribers with same consumerID
    • Start an app with 1 publisher and 2 subscribers
    • The publisher publishes to 1 topic with 2 partitions (EventHub scalable consumer pattern)
    • The subscriber is subscribed to 1 topic
    • Test: Sends 10+ unique messages
    • App: Simulates periodic errors
    • Component: Retries on error
    • App: Observes successful messages
    • Test: Confirms that all expected messages were received
    • Test: Confirms that each subscriber receive messages from only one partition
  • Test single publisher / multiple subscribers with different consumerIDs
    • Start an app with 1 publisher and 2 subscribers
    • The publisher publishes to 1 topic with 2 partitions (EventHub scalable consumer pattern)
    • The subscriber is subscribed to 1 topic
    • Test: Sends 10+ unique messages
    • App: Simulates periodic errors
    • Component: Retries on error
    • App: Observes successful messages
    • Test: Confirms that all expected messages were received
    • Test: Confirms that each subscriber receives messages from both partitions
  • Test multiple publishers / multiple subscribers with different consumerIDs
    • Start an app with 2 publishers and 2 subscribers
    • The publisher publishes to 1 topic with 2 partitions (EventHub scalable consumer pattern)
    • The subscriber is subscribed to 1 topic
    • Test: Sends 10+ unique messages from each publisher
    • App: Simulates periodic errors
    • Component: Retries on error
    • App: Observes successful messages
    • Test: Confirms that all expected messages were received
    • Test: Confirms that each subscriber receives messages from both partitions
  • Test entity management
    • Start a publisher and subscriber with a topic that does not exist
    • Test: Confirm creation of topic/eventHub in given eventHub namespace
    • Test: Send 10+ unique messasges to the newly created eventHub topic
    • App: Observe successful messages
    • Test: Confirm that subscriber receives all messages
  • Test IOT Event Hub
    • Start an app with 1 publisher and 1 subscriber
    • The publisher publishes to 1 IOT EventHub with 1 partition
    • The subscriber is subscribed to 1 topic
    • Test: Sends 10+ unique messages
    • App: Simulates periodic errors
    • Component: Retries on error
    • App: Observes successful messages
    • Test: Confirms that all expected messages were received
    • Test: Confirms that all expected system properties are set

Authentication Tests

  • Test connection string based authentication mechanism
  • Test AAD Service Principal based authentication
    • Utilize a service principal with appropriate roles granted

Network Tests

  • Simulate network interruptions [TODO : network interruptions during publish]
    • Test: Simulate network interruptions
    • Component: Begins to reconnect and resubscribe

Running the tests

This must be run in the GitHub Actions Workflow configured for test infrastructure setup.

If you have access to an Azure subscription you can run this locally on Mac or Linux after running setup-azure-conf-test.sh in .github/infrastructure/conformance/azure and then sourcing the generated bash rc file.

One can even run the test in local by just updating metadata values related to azure resources in components/*/eventhubs.yaml.