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

Integration tests are not stable #258

Closed
ygf11 opened this issue Sep 16, 2022 · 7 comments
Closed

Integration tests are not stable #258

ygf11 opened this issue Sep 16, 2022 · 7 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@ygf11
Copy link
Contributor

ygf11 commented Sep 16, 2022

Describe this problem

For create table test,

https://github.com/CeresDB/ceresdb/blob/25557c73adaa6815875aaea3ccd5b61bf54e291f/tests/cases/local/05_ddl/create_tables.sql#L64

it will report error like:

Failed to execute query, err: Server(ServerError { code: 500, msg: "Failed to execute interpreter, query: CREATE TABLE `05_create_tables_t8`(c1 int, t1 timestamp NOT NULL TIMESTAMP KEY) ENGINE = Analytic with (storage_format= 'unknown');. Caused by: Failed to execute create table, err:Failed to create table, name:05_create_tables_t8, err:Failed to create table, err:Invalid arguments, err:Invalid options, space_id:2, table:05_create_tables_t8, table_id:2199023255725, err:Unknown storage format. value:\"unknown\"." })

The table_id in error message is not stable in my local pc, it will change if I run tests again.

The issue maybe is in test config, we use Local storage as the server config for integration tests now.

cc: @waynexia @jiacai2050

Steps to reproduce

Run tests again.

Expected behavior

The output should the same as before when we rerun tests.

Additional Information

No response

@ygf11 ygf11 added the bug Something isn't working label Sep 16, 2022
@ygf11 ygf11 changed the title Integert tests are not stable Integration tests are not stable Sep 16, 2022
@jiacai2050
Copy link
Contributor

Yeah, it's already reported in #114 (comment)

For your case, you can ignore this error for now, we will support special interceptor to replace those random string in near future(maybe one month I guess).

@ygf11
Copy link
Contributor Author

ygf11 commented Sep 16, 2022

For your case, you can ignore this error for now, we will support special interceptor to replace those random string in near future(maybe one month I guess).

Thanks, got it.

@jiacai2050 jiacai2050 added the help wanted Extra attention is needed label Sep 26, 2022
@ShiKaiWi
Copy link
Member

#270 will fix this. The reason for this bug is that the test data won't be cleaned before any run, while the table id is auto-incremented, so the created, dropped, created-again table may have different table ids every time run the tests.

@jiacai2050
Copy link
Contributor

jiacai2050 commented Sep 27, 2022

I think of one corner case even when #270 is merged

if users drop a new table in 00_dummy, then all table id after 00_dummy will be affected

So an interceptor may also need to deal with this case.

@ShiKaiWi
Copy link
Member

I think of one corner case even when #270 is merged

if users drop a new table in 00_dummy, then all table id after 00_dummy will be affected

So an interceptor may also need to deal with this case.

Actually, just update the result files if the test cases are modified.

@jiacai2050
Copy link
Contributor

It may be a little annoying since those other files are not touched.

Fow now I think it's OK to update those files manually since there are not many table ids in our testcases, but I prefer to keep the ability to replace something before diff.

@ShiKaiWi
Copy link
Member

ShiKaiWi commented Oct 8, 2022

I guess #270 has fixed this, so let's close it.

@ShiKaiWi ShiKaiWi closed this as completed Oct 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants