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

minio-js takes 15minutes to complete #163

Closed
harshavardhana opened this issue Sep 29, 2017 · 10 comments
Closed

minio-js takes 15minutes to complete #163

harshavardhana opened this issue Sep 29, 2017 · 10 comments
Assignees
Milestone

Comments

@harshavardhana
Copy link
Member

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 nitisht added this to the Current milestone Sep 30, 2017
@nitisht
Copy link
Contributor

nitisht commented Sep 30, 2017

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
Copy link
Contributor

nitisht commented Oct 3, 2017

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
Copy link
Contributor

nitisht commented Oct 4, 2017

@kannappanr @harshavardhana can we close this issue?

@harshavardhana
Copy link
Member Author

We can close as not reproducible anymore..

@harshavardhana
Copy link
Member Author

Not reproducible will reopen if seen again.

@nitisht nitisht reopened this Oct 9, 2017
@nitisht
Copy link
Contributor

nitisht commented Oct 9, 2017

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

@kannappanr
Copy link
Collaborator

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

kannappanr added a commit to kannappanr/mint that referenced this issue Oct 10, 2017
Mocha version 4.0.1 seems to hang our functional tests.
Package.json is being modified to install 3.5.0, which does not hang
functional tests.

Fixes minio#163
@harshavardhana
Copy link
Member Author

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 added a commit to kannappanr/mint that referenced this issue Oct 10, 2017
Mocha version 4.0.1 seems to hang our functional tests.
Package.json is being modified to install 3.5.0, which does not hang
functional tests.

Fixes minio#163
@kannappanr
Copy link
Collaborator

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
Copy link
Collaborator

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.

kannappanr added a commit to kannappanr/mint that referenced this issue Oct 11, 2017
Mocha version 4.0.0 and above seems to hang functional tests
if --exit flag is not passed.

Added --exit flag to where mocha is being executed in run.sh

Fixes minio#163
nitisht pushed a commit that referenced this issue Oct 11, 2017
@nitisht nitisht added the fixed label Oct 23, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants