This commit is contained in:
Catalina Peralta 2020-09-21 15:48:39 -07:00
Родитель 4ed43c72b5
Коммит c8ff9f4836
3 изменённых файлов: 25 добавлений и 26 удалений

Просмотреть файл

@ -60,28 +60,3 @@ jobs:
gocyclo -over 19 .
workingDirectory: '$(sdkPath)'
displayName: 'Cyclo'
- script: |
set -e
go test -race -v -coverprofile=coverage.txt -covermode atomic ./... 2>&1 | go-junit-report > report.xml
gocov convert coverage.txt > coverage.json
gocov-xml < coverage.json > coverage.xml
gocov-html < coverage.json > coverage.html
workingDirectory: '$(sdkPath)'
displayName: 'Run Tests'
- script: |
gofmt -s -l -w . >&2
workingDirectory: '$(sdkPath)'
displayName: 'Format Check'
failOnStderr: true
condition: succeededOrFailed()
- task: PublishTestResults@2
inputs:
testRunner: JUnit
testResultsFiles: $(sdkPath)/report.xml
failTaskOnFailedTests: true
- task: PublishCodeCoverageResults@1
inputs:
codeCoverageTool: Cobertura
summaryFileLocation: $(sdkPath)/coverage.xml
additionalCodeCoverageFiles: $(sdkPath)/coverage.html

Просмотреть файл

@ -41,3 +41,27 @@ steps:
goveralls -coverprofile=cover.out -service=azure-devops
make destroy-sb
displayName: 'Run Integration Tests'
- script: |
set -e
go test -race -v -coverprofile=coverage.txt -covermode atomic ./... 2>&1 | go-junit-report > report.xml
gocov convert coverage.txt > coverage.json
gocov-xml < coverage.json > coverage.xml
gocov-html < coverage.json > coverage.html
workingDirectory: '$(sdkPath)'
displayName: 'Run Tests'
- script: |
gofmt -s -l -w . >&2
workingDirectory: '$(sdkPath)'
displayName: 'Format Check'
failOnStderr: true
condition: succeededOrFailed()
- task: PublishTestResults@2
inputs:
testRunner: JUnit
testResultsFiles: $(sdkPath)/report.xml
failTaskOnFailedTests: true
- task: PublishCodeCoverageResults@1
inputs:
codeCoverageTool: Cobertura
summaryFileLocation: $(sdkPath)/coverage.xml
additionalCodeCoverageFiles: $(sdkPath)/coverage.html

Просмотреть файл

@ -355,7 +355,7 @@ func testBatchSendTooLarge(ctx context.Context, t *testing.T, client *Hub, _ str
}
ebi := NewEventBatchIterator(events...)
assert.EqualError(t, client.SendBatch(ctx, ebi, BatchWithMaxSizeInBytes(10000000)), "encoded message size exceeds max of 1046528")
assert.EqualError(t, client.SendBatch(ctx, ebi, BatchWithMaxSizeInBytes(10000000)), "encoded message size exceeds max of 1048576")
}
func testBasicSendAndReceive(ctx context.Context, t *testing.T, client *Hub, partitionID string) {