Skip to content

Arch Forum 2025-11-06

Participants: Backend devs, Andy, JD, Victor, Magnus

Agenda

  • Default Parallelize attribute
  • Local secrets (LimKevin)
  • Transaction push notifications responsibility

Summary

Parallelize Attribute

MSTest now forces you to specify either [assembly: Parallelize] or [assembly: DoNotParallelize] on the assembly. When [assembly: Parallelize] is used, by default it will run at the ClassLevel scope and adjust threads to the number of cores.

These attributes are documented at MSTest attributes.

The suggestion is that [assembly: Parallelize(Scope = ExecutionScope.MethodLevel)] should be our default unless it doesn't work. See, for example, this AssemblyInfo.

Whenever you write new code:

  • Always set the Parallelize attribute on the assembly.
  • Set the Scope to ExecutionScope.MethodLevel
  • Only use DoNotParallelize if really needed, and preferably only as an override on specific tests.

Local Secrets

Examples from Platform:

Documentation: User Secrets

Transaction Push Notifications Responsibility

Given the more complex logic around when and what to send as push notifications, we want to move responsibility for push notifications to the initiator of managed transactions instead of the Transactions area.

To send a push notification, publish a SendPushNotificationRequestMessage. See the example in TransactionService.cs.

See Managed Transactions for details.