Skip to content

Develop worker indexing unit tests #7582

Closed
@anandagopal6

Description

@anandagopal6

Unit tests need to be developed to ensure that the worker-indexing code path functions properly.

Potential Test Cases

  • GrpcWorkerChannel
    • Mock inbound successful FunctionMetadataResponses event
    • Mock inbound failed FunctionMetadataResponses event
    • TimeoutException for receiving FunctionMetadataResponses
  • RpcFunctionInvocationDispatcher
    • Create maxProcessCount GrpcWorkerChannels in reorganized InitializeAsync call
    • Create GrpcWorkerChannels and setup invocation buffers after receiving function metadata
    • Null functions parameter and not worker indexing
  • WorkerFunctionMetadataProvider
    • Valid and invalid function name
    • Valid and invalid bindings
    • GetFunctionMetadataAsync mock metadata response and dispatcher
  • Utility.CanWorkerIndex()
    • Enabled feature flag + worker config property
    • Enabled feature flag + missing worker config property
    • Disabled feature flag + worker config property
    • Disabled feature flag + missing worker config property
    • Null worker config file
    • Null worker config description
    • Null workerIndexing attribute
  • FunctionMetadataManager
    • Mock worker configs and check to see if correct provider is returned
  • ScriptStartupTypeLocator
    • If workerIndexing, get all types

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions