Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed storage flaky live tests Part 2 #6850

Merged
merged 8 commits into from
Dec 16, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -148,12 +148,12 @@ class APISpec extends Specification {
// in case the upload or download open too many connections.
System.setProperty("reactor.bufferSize.x", "16")
System.setProperty("reactor.bufferSize.small", "100")
System.out.println(String.format("--------%s---------", testMode))
}

def setup() {
String fullTestName = specificationContext.getCurrentIteration().getName().replace(' ', '').toLowerCase()
String className = specificationContext.getCurrentSpec().getName()

int iterationIndex = fullTestName.lastIndexOf("[")
int substringIndex = (int) Math.min((iterationIndex != -1) ? iterationIndex : fullTestName.length(), 50)
this.testName = fullTestName.substring(0, substringIndex)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ public PathInfo flush(long position) {
*/
public PathInfo flush(long position, boolean overwrite) {
DataLakeRequestConditions requestConditions = new DataLakeRequestConditions();
if (!overwrite) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why was this changed?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Man, you were soooo close to preventing this bug from being released

if (overwrite) {
requestConditions = new DataLakeRequestConditions().setIfNoneMatch(Constants.HeaderConstants.ETAG_WILDCARD);
}
return flushWithResponse(position, false, false, null, requestConditions, null, Context.NONE).getValue();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1418,7 +1418,7 @@ class FileAPITest extends APISpec {
fc.flush(defaultDataSize)
fc.append(new ByteArrayInputStream(defaultData.array()), 0, defaultDataSize)
// Attempt to write data without overwrite enabled
fc.flush(defaultDataSize, false)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why was this changed?

fc.flush(defaultDataSize, true)

then:
thrown(DataLakeStorageException)
Expand Down
6 changes: 6 additions & 0 deletions sdk/storage/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@ trigger: none
jobs:
- template: ../../eng/pipelines/templates/jobs/archetype-sdk-tests.yml
parameters:
Matrix:
Windows - Java 8:
OSName: 'Windows'
OSVmImage: 'windows-2019'
JavaVersion: '1.8'
DisplayName: 'Windows - Java 8'
ServiceDirectory: storage
EnvVars:
AZURE_TEST_MODE: LIVE
Expand Down