-
Notifications
You must be signed in to change notification settings - Fork 18
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
Integration test fixes and ttl/writetime auto flag default changes to false #235
Integration test fixes and ttl/writetime auto flag default changes to false #235
Conversation
e4ed804
to
f57479f
Compare
_info "Moving ${testDir}/output/$(basename ${testDir})/*.err TO ${testDir}/output" | ||
mv ${testDir}/output/$(basename ${testDir})/*.err ${testDir}/output | ||
docker cp ${DOCKER_CDM}:/${testDir} ${testDir}/output/ | ||
_info "Moving ${testDir}/output/$(basename ${testDir})/output/*.out TO ${testDir}/output" |
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.
_info "Moving ${testDir}/output/$(basename ${testDir})/output/*.out TO ${testDir}/output" | |
_info "Moving ${testDir}/output/$(basename ${testDir})/output/*.out TO ${testDir}/output/" |
@@ -85,10 +85,10 @@ public enum PropertyType { | |||
required.add(ORIGIN_KEYSPACE_TABLE); | |||
types.put(ORIGIN_TTL_NAMES, PropertyType.STRING_LIST); | |||
types.put(ORIGIN_TTL_AUTO, PropertyType.BOOLEAN); | |||
defaults.put(ORIGIN_TTL_AUTO, "true"); |
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.
Curious, does these changes fixes any integration tests?
@@ -81,7 +81,7 @@ _testDockerNetwork() { | |||
} | |||
|
|||
_testDockerCassandra() { | |||
dockerPs=$(docker ps -a | awk '{if ($NF == "'${DOCKER_CASS}'") {print "yes"}}') | |||
dockerPs=$(docker ps | awk '{if ($NF == "'${DOCKER_CASS}'") {print "yes"}}') |
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.
Now with this change in place, I'm running into this error,
INFO Starting Docker container cdm-sit-cass
docker: Error response from daemon: Conflict. The container name "/cdm-sit-cass" is already in use by container "37ef23ba475bc76e1e80fec2b8c80edbc336a5c1149261912fbfd2571f1b0ad0". You have to remove (or rename) that container to be able to reuse that name.
See 'docker run --help'.
Could you please showcase how you originally encountered the error that you have in the PR description and provide reproduction steps? TY!
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.
Try this - kill your ITs in the middle of the run after the docker containers come up and then restart your docker engine. This will stop the running containers, but they will remain there and continue to get returned in the docker ps -a
output.
@@ -81,7 +81,7 @@ _testDockerNetwork() { | |||
} | |||
|
|||
_testDockerCassandra() { | |||
dockerPs=$(docker ps -a | awk '{if ($NF == "'${DOCKER_CASS}'") {print "yes"}}') | |||
dockerPs=$(docker ps | awk '{if ($NF == "'${DOCKER_CASS}'") {print "yes"}}') |
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.
Now with this change in place, I'm running into this error,
INFO Starting Docker container cdm-sit-cass
docker: Error response from daemon: Conflict. The container name "/cdm-sit-cass" is already in use by container "37ef23ba475bc76e1e80fec2b8c80edbc336a5c1149261912fbfd2571f1b0ad0". You have to remove (or rename) that container to be able to reuse that name.
See 'docker run --help'.
Could you please showcase how you originally encountered the error that you have in the PR description and provide reproduction steps? TY!
mv ${testDir}/output/$(basename ${testDir})/*.err ${testDir}/output | ||
docker cp ${DOCKER_CDM}:/${testDir} ${testDir}/output/ | ||
_info "Moving ${testDir}/output/$(basename ${testDir})/output/*.out TO ${testDir}/output" | ||
mv ${testDir}/output/$(basename ${testDir})/output/*.out ${testDir}/output/ |
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.
This line for example is resolving as,
INFO Moving smoke/05_reserved_keyword/output/05_reserved_keyword/*.err TO smoke/05_reserved_keyword/output
where, smoke/05_reserved_keyword/output/05_reserved_keyword
directory doesn't exist today
Since the auto flag is now influencing whether the feature is enabled, I flipped the default value to false, since one of the ITs was failing with a validation error, expecting the feature to be disabled. @mieslep sais default should be true.. ..i'll revert that change and figure out how to deal with the failing IT.. |
types.put(ORIGIN_WRITETIME_NAMES, PropertyType.STRING_LIST); | ||
types.put(ORIGIN_WRITETIME_AUTO, PropertyType.BOOLEAN); | ||
defaults.put(ORIGIN_WRITETIME_AUTO, "true"); | ||
defaults.put(ORIGIN_WRITETIME_AUTO, "false"); |
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.
@arvy I believe you may be right here. For example, if we have a counter table, then we receive the following when it is turned on,
2023-12-15 15:45:31 ERROR [] WritetimeTTL:117 - Counter table cannot specify TTL or WriteTimestamp columns as they cannot set on write
2023-12-15 15:45:31 ERROR [] CopyJobSession:80 - Feature com.datastax.cdm.feature.WritetimeTTL is not valid. Please check the configuration.
Marking this PR as closed as the |
@all-contributors please add @arvy for userTesting doc |
I've put up a pull request to add @arvy! 🎉 |
In two places in environment.sh we do a check to see if a container is up and running, but we user docker ps -a, which lists all containers (if those that are not running). I encountered this issue while trying to run the integration tests locally:
Checklist: