Skip to content

[BUG] Requires live mode messes with data in certain scenarios. #5912

Description

@rickle-msft

Given the following test helper method:

def compareDataToFile(Flux<ByteBuffer> data, File file) {
        FileInputStream fis = new FileInputStream(file)

        for (ByteBuffer received : data.toIterable()) {
            byte[] readBuffer = new byte[received.remaining()]
            fis.read(readBuffer)
            for (int i = 0; i < received.remaining(); i++) {
                if (readBuffer[i] != received.get(i)) {
                    return false
                }
            }
        }

        fis.close()
        return true
    }

being called from a test that downloads a blob and passes the returned Flux in along with the sourceFile that was uploaded produces different results depending on the presence of the @requires( {liveMode()} ) annotation.

For dataSizes over a few MB, the test will consistently fail. More specifically, what appears to happen is that the presence of the annotation causes the items coming from the result of toIterable to be out of order. Small data sizes do not fail because there is only one emission, but anything with more than one emission will fail. The data downloaded is correct (which can be observed by downloading to a file and comparing those results instead). The test behavior changes reliably by toggling the presence of this annotation, but it is not clear why.

Metadata

Metadata

Labels

Azure.Coreazure-coreClientThis issue points to a problem in the data-plane of the library.bugThis issue requires a change to an existing behavior in the product in order to be resolved.

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions