-
Notifications
You must be signed in to change notification settings - Fork 189
Feature/copy and move file #33
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
Conversation
Add build status image
README.md
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[](https://travis-ci.org/qiniu/nodejs-sdk)
test/config.js
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
上次不是讨论了,ACCESS_KEY, SECRET_KEY 这种变量,不应该出现在代码里面,应该放到 travis 的环境变量里面么?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
已更新。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
老许是说放到 .travis.yml 的 env 中,感觉没有必要了,这个 .travis.yml 也是可见的。必须要暴露一对测试用的密钥。
test/rs.test.js
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
test/rs.test.js
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bucket 名也放到 env 中:QINIU_TEST_BUCKET
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个 bucket 名是根据时间来生成的,每次测试通过后会删除。在 travis-ci.org 里并行跑 0.6 以及 0.8 版本的 Node.js,可能一个环境创建好 bucket 后在使用完成前,这个 bucket 就被另一个环境删除了。所以我让每个环境生成的 bucket 都不一样。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no, 用同一个 bucket 有问题的。
问题1: 多个 jobs 并发跑测试,job1若drop bucket, 会导致job2,job3的单元测试跑失败
问题2: before_all:mkbucket, after_all:drop 也是测试的 case, 不管其他 case 有无执行失败, after_all 都会清理 drop test bucket
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
固定 bucket 会漏测 /mkbucket 和 /drop 接口, 对一般集成测试来讲,还是测的比较全面比较好,用单元测试构建整个上下文是最好的。况且 drop 现在也没有副作用
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
还有一个问题。如果固定 bucket, 那么多个 VMs 在跑的时候都是跑的同1套CASEs, 并发的测试程序操作的 bucket:key 也是同1个,不知道会出现什么奇怪问题导致测试失败。严重不建议固化bucket, 整个测试环境上下文本身就应该用单元测试脚本构建和完成,这才是集成测试。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
那你这里也没有做到不一样,在同一秒运行多个案例,就冲突了。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
可以取到nodejs版本么?要不用 "qiniutest" + env.VMSTRING
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
在同一秒运行多个案例的情况很少发生。固化 bucket 导致的 travis-ci.org 测试错误是经常发生的。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
精度需要高点,jobs 一般同时跑5个,也就是说1秒内都在并发的跑。可以精确到毫秒
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Timer.ontimeout,需 Restart Build.
No description provided.