Skip to content

Commit

Permalink
Adding a sleep time if a new connector is created and AD permissions …
Browse files Browse the repository at this point in the history
…are specified.
  • Loading branch information
SSvilen committed Feb 3, 2020
1 parent 414de2a commit c42b370
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ For older change log history see the [historic changelog](HISTORIC_CHANGELOG.md)
- xExchange
- Update CI pipeline files.
- Fixing xExchSendConnector ExtendedRight functionality by moving the test function
to the helper module and setting explicit Deny permissions, instead of removing
the marked as 'Deny' entries.
to the helper module and setting explicit Deny permissions, instead of removing
the marked as 'Deny' entries.

## [1.31.0] - 2020-01-27

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -332,11 +332,6 @@ function Set-TargetResource

$connector = Get-TargetResource -Name $Name -Credential $Credential -AddressSpaces $AddressSpaces

if (-not $DomainController)
{
$PSBoundParameters['DomainController'] = Get-DomainController | Select-Object -First 1 | ForEach-Object -MemberName 'DnsHostName'
}

if ($Ensure -eq 'Absent')
{
Write-Verbose -Message "Removing send connector $Name."
Expand All @@ -358,6 +353,12 @@ function Set-TargetResource

New-SendConnector @PSBoundParameters

if ($ExtendedRightAllowEntries -or $ExtendedRightDenyEntries)
{
# Setting some sleep period to allow intra-site replication
Start-Sleep -Seconds 180
}

if ($ExtendedRightAllowEntries)
{
foreach ($ExtendedRightAllowEntry in $ExtendedRightAllowEntries)
Expand Down
1 change: 1 addition & 0 deletions tests/Unit/MSFT_xExchSendConnector.tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -402,6 +402,7 @@ try
$TestTargetResourceParamsFalse['ExtendedRightAllowEntries'] = (
New-CimInstance -ClassName 'MSFT_KeyValuePair' -Property @{
key = 'User1Allow'
# Picking 2 random permissions to test with
value = 'ms-Exch-SMTP-Accept-Any-Recipient,ms-Exch-SMTP-Accept-Authoritative-Domain-Sender'
} -ClientOnly
)
Expand Down

0 comments on commit c42b370

Please sign in to comment.