minio / mint

Collection of tests to detect overall correctness of MinIO server.
Apache License 2.0
79 stars 50 forks source link

minio-js takes 15minutes to complete #163

Closed harshavardhana closed 6 years ago

harshavardhana commented 6 years ago
docker run --net=host -e SERVER_ENDPOINT=192.168.1.17:9001 -e ACCESS_KEY=minio -e SECRET_KEY=minio123 minio/mint
To get intermittent logs, 'sudo docker cp c2dafd5ca919:/mint/log /tmp/mint-logs'
Running aws-sdk-php tests ... done in 2 seconds
Running aws-sdk-ruby tests ... done in 2 seconds
Running awscli tests ... done in 39 seconds
Running mc tests ... done in 5 seconds
Running minio-go tests ... done in 38 seconds
Running minio-java tests ... done in 56 seconds
Running minio-js tests ... done in 15 minutes and 1 seconds
Running minio-py tests ... done in 11 seconds
Finished running all tests.
nitisht commented 6 years ago

even after completion, some tests seem not run or missing in the logs, I get only these logs

{"name":"minio-js","function":"listBuckets(cb)","duration":17,"status":"PASS"}
{"name":"minio-js","function":"listBuckets()","duration":6,"status":"PASS"}
{"name":"minio-js","function":"makeBucket(bucketName, region, cb)","args":"region:us-east-2","duration":1,"status":"PASS"}
{"name":"minio-js","function":"makeBucket(bucketName, region, cb)","duration":2,"status":"PASS"}
{"name":"minio-js","function":"removeBucket(bucketName, cb)","duration":2,"status":"PASS"}
{"name":"minio-js","function":"makeBucket(bucketName, region)","duration":1,"status":"PASS"}
{"name":"minio-js","function":"removeBucket(bucketName)","duration":2,"status":"PASS"}
{"name":"minio-js","function":"bucketExists(bucketName, cb)","duration":5,"status":"PASS"}
{"name":"minio-js","function":"bucketExists(bucketName, cb)","args":"bucketName:nonexistentbucket","duration":4,"status":"PASS"}
{"name":"minio-js","function":"bucketExists(bucketName)","duration":1,"status":"PASS"}
{"name":"minio-js","function":"removeBucket(bucketName, cb)","args":"bucketName:nonexistentbucket","duration":2,"status":"PASS"}
{"name":"minio-js","function":"makeBucket(bucketName, region)","args":"region:us-east-1","duration":2,"status":"PASS"}
{"name":"minio-js","function":"putObject(bucketName, objectName, stream, contentType)","args":"objectName:MultiPath100kbObjectBufferName,stream:100Kib","duration":16,"status":"PASS"}
{"name":"minio-js","function":"getObject(bucketName, objectName, callback)","args":"objectName:MultiPath100kbObjectBufferName","duration":2,"alert":"download 100KiB Buffer and match content","status":"PASS"}
{"name":"minio-js","function":"removeObject(bucketName, objectName)","args":"objectName:MultiPath100kbObjectBufferName","duration":2,"status":"PASS"}
{"name":"minio-js","function":"fPutObject(bucketName, objectName, filePath, contentType, callback)","duration":12,"status":"PASS"}
{"name":"minio-js","function":"putObject(bucketName, objectName, stream, size, contentType, callback)","args":"objectName:100kbObjectName","duration":12,"status":"PASS"}
{"name":"minio-js","function":"putObject(bucketName, objectName, stream, size, contentType, callback)","args":"objectName:100kbObjectName","duration":8,"status":"PASS"}
{"name":"minio-js","function":"getObject(bucketName, objectName, callback)","args":"objectName:100kbObjectName","duration":2,"status":"PASS"}
{"name":"minio-js","function":"putObject(bucketName, objectName, stream, callback)","args":"objectName:100kbObjectName, stream:100kb","duration":8,"status":"PASS"}
{"name":"minio-js","function":"getObject(bucketName, objectName, callback)","args":"objectName:100kbObjectName","duration":3,"alert":"download 100KiB Buffer and match content","status":"PASS"}
{"name":"minio-js","function":"putObject(bucketName, objectName, stream, contentType)","args":"stream:100Kib","duration":8,"status":"PASS"}
{"name":"minio-js","function":"getPartialObject(bucketName, objectName, offset, length, cb)","args":"offset:0, length=1024","duration":2,"status":"PASS"}
{"name":"minio-js","function":"getPartialObject(bucketName, objectName, offset, length, cb)","args":"offset:1024, length=1024","duration":2,"status":"PASS"}
nitisht commented 6 years ago

Issue is not reproducible in the latest Mint image:

Running with
SERVER_ENDPOINT: 127.0.0.1:9000
ACCESS_KEY:      8NEHCZGBRW7MN70FMLES
SECRET_KEY:      ***REDACTED***
ENABLE_HTTPS:    0
SERVER_REGION:   us-east-1
MINT_DATA_DIR:   /mint/data
MINT_MODE:       core
To get intermittent logs, 'sudo docker cp 3f4804d713fb:/mint/log /tmp/mint-logs'
Running aws-sdk-php tests ... done in 0 seconds
Running aws-sdk-ruby tests ... done in 2 seconds
Running awscli tests ... done in 24 seconds
Running mc tests ... done in 2 seconds
Running minio-go tests ... done in 19 seconds
Running minio-java tests ... done in 40 seconds
Running minio-js tests ... done in 24 seconds
Running minio-py tests ... done in 9 seconds
Finished running all tests.
To get logs, run 'sudo docker cp 3f4804d713fb:/mint/log /tmp/mint-logs'
nitisht commented 6 years ago

@kannappanr @harshavardhana can we close this issue?

harshavardhana commented 6 years ago

We can close as not reproducible anymore..

harshavardhana commented 6 years ago

Not reproducible will reopen if seen again.

nitisht commented 6 years ago

This issue can be observed again on minio/mint:latest image. @kannappanr

kannappanr commented 6 years ago

mocha version 4.0.1 seems to make the test hang. Modifying package.json to include mocha 3.5.0 instead of the latest which is 4.0.1

harshavardhana commented 6 years ago

mocha version 4.0.1 seems to make the test hang. Modifying package.json to include mocha 3.5.0 instead of the latest which is 4.0.1

Is there a relevant bug upstream?

kannappanr commented 6 years ago

Found this behavior by accident. Just did more tests and found that it works till mocha 3.5.3. It fails on 4.0.0 (released 8 days ago) and 4.0.1 (released 5 days ago). Need to dig more, because this is a combination of minio-js and the recent mocha versions. I haven't looked into issues filed against mocha, if that is what you ask.

kannappanr commented 6 years ago

Found this in mocha's release note

Default Behavior

#2879: By default, Mocha will no longer force the process to exit once all tests complete. This means any test code (or code under test) which would normally prevent node from exiting will do so when run in Mocha. Supply the --exit flag to revert to pre-v4.0.0 behavior (@ScottFreeCode, @boneskull)

So, I am going to revert the change in the PR and add --exit flag to the script that runs the functional test.