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

Specs fail locally #22

Closed
jwoertink opened this issue Sep 12, 2022 · 4 comments · Fixed by #31
Closed

Specs fail locally #22

jwoertink opened this issue Sep 12, 2022 · 4 comments · Fixed by #31

Comments

@jwoertink
Copy link
Contributor

When I run crystal spec locally, I get these failures. Maybe I'm missing something in my setup?

 crystal spec 
EEEUnhandled exception: ERR unknown command `ft.create`, with args beginning with: `20ee49d1-9a92-4713-83ea-e70129d74627`, `ON`, `HASH`, `PREFIX`, `1`, `03c6317e-70dd-4d47-b3c0-4ef7c703ff7f:`, `SCHEMA`, `name`,  (Redis::Error)
  from src/parser.cr:54:9 in 'read'
  from src/connection.cr:300:7 in 'read'
  from src/connection.cr:251:18 in 'run'
  from src/connection.cr:245:5 in 'run'
  from src/search.cr:99:7 in 'create'
  from spec/search_spec.cr:42:7 in '->'
  from /usr/share/crystal/src/spec/context.cr:43:32 in 'run_before_all_hooks'
  from /usr/share/crystal/src/spec/context.cr:17:7 in 'internal_run'
  from /usr/share/crystal/src/spec/context.cr:339:7 in 'run'
  from /usr/share/crystal/src/spec/context.cr:18:23 in 'internal_run'
  from /usr/share/crystal/src/spec/context.cr:156:7 in 'run'
  from /usr/share/crystal/src/spec/dsl.cr:220:7 in '->'
  from /usr/share/crystal/src/crystal/at_exit_handlers.cr:14:19 in 'run'
  from /usr/share/crystal/src/crystal/main.cr:50:5 in 'exit'
  from /usr/share/crystal/src/crystal/main.cr:45:5 in 'main'
  from /usr/share/crystal/src/crystal/main.cr:127:3 in 'main'
  from /lib/x86_64-linux-gnu/libc.so.6 in '??'
  from /lib/x86_64-linux-gnu/libc.so.6 in '__libc_start_main'
  from /home/jeremy/.cache/crystal/crystal-run-spec.tmp in '_start'
  from ???


Failures:

  1) Redis::TimeSeries(Runnable) creates a TimeSeries key

       ERR unknown command `ts.create`, with args beginning with: `d9dbb1e6-ba9a-4cab-84c3-c03917b1a338`, `retention`, `86400000`, `encoding`, `COMPRESSED`, `chunk_size`, `128`, `duplicate_policy`,  (Redis::Error)
         from src/parser.cr:54:9 in 'read'
         from src/connection.cr:300:7 in 'read'
         from src/connection.cr:251:18 in 'run'
         from src/connection.cr:245:5 in 'run'
         from src/time_series.cr:51:7 in 'create'
         from spec/time_series_spec.cr:23:7 in '->'
         from /usr/share/crystal/src/spec/example.cr:45:13 in 'internal_run'
         from /usr/share/crystal/src/spec/example.cr:33:16 in 'run'
         from /usr/share/crystal/src/spec/context.cr:18:23 in 'internal_run'
         from /usr/share/crystal/src/spec/context.cr:339:7 in 'run'
         from /usr/share/crystal/src/spec/context.cr:18:23 in 'internal_run'
         from /usr/share/crystal/src/spec/context.cr:156:7 in 'run'
         from /usr/share/crystal/src/spec/dsl.cr:220:7 in '->'
         from /usr/share/crystal/src/crystal/at_exit_handlers.cr:14:19 in 'run'
         from /usr/share/crystal/src/crystal/main.cr:50:5 in 'exit'
         from /usr/share/crystal/src/crystal/main.cr:45:5 in 'main'
         from /usr/share/crystal/src/crystal/main.cr:127:3 in 'main'
         from /lib/x86_64-linux-gnu/libc.so.6 in '??'
         from /lib/x86_64-linux-gnu/libc.so.6 in '__libc_start_main'
         from /home/jeremy/.cache/crystal/crystal-run-spec.tmp in '_start'
         from ???
       

  2) Redis::TimeSeries(Runnable) gets the last datapoint for a key

       ERR unknown command `ts.create`, with args beginning with: `e683080e-649a-4d7f-b6f2-2df1432610b9`, `retention`, `604800000`, `duplicate_policy`, `FIRST`, `labels`, `test`, `0a4abb12-95f2-4`,  (Redis::Error)
         from src/parser.cr:54:9 in 'read'
         from src/connection.cr:300:7 in 'read'
         from src/connection.cr:251:18 in 'run'
         from src/connection.cr:245:5 in 'run'
         from src/time_series.cr:51:7 in 'create:retention:duplicate_policy:labels'
         from spec/time_series_spec.cr:51:1 in '->'
         from /usr/share/crystal/src/spec/example.cr:45:13 in 'internal_run'
         from /usr/share/crystal/src/spec/example.cr:33:16 in 'run'
         from /usr/share/crystal/src/spec/context.cr:18:23 in 'internal_run'
         from /usr/share/crystal/src/spec/context.cr:339:7 in 'run'
         from /usr/share/crystal/src/spec/context.cr:18:23 in 'internal_run'
         from /usr/share/crystal/src/spec/context.cr:156:7 in 'run'
         from /usr/share/crystal/src/spec/dsl.cr:220:7 in '->'
         from /usr/share/crystal/src/crystal/at_exit_handlers.cr:14:19 in 'run'
         from /usr/share/crystal/src/crystal/main.cr:50:5 in 'exit'
         from /usr/share/crystal/src/crystal/main.cr:45:5 in 'main'
         from /usr/share/crystal/src/crystal/main.cr:127:3 in 'main'
         from /lib/x86_64-linux-gnu/libc.so.6 in '??'
         from /lib/x86_64-linux-gnu/libc.so.6 in '__libc_start_main'
         from /home/jeremy/.cache/crystal/crystal-run-spec.tmp in '_start'
         from ???
       

  3) Redis::TimeSeries(Runnable) gets a range for keys

       ERR unknown command `ts.add`, with args beginning with: `mrange-test:foo=included`, `*`, `1`, `retention`, `60000`, `on_duplicate`, `SUM`, `labels`, `foo`, `included`,  (Redis::Error)
         from src/parser.cr:54:9 in 'read'
         from src/connection.cr:300:7 in 'read'
         from src/connection.cr:251:18 in 'run'
         from src/connection.cr:245:5 in 'run'
         from src/time_series.cr:88:7 in 'add:retention:on_duplicate:labels'
         from spec/time_series_spec.cr:63:9 in '->'
         from /usr/share/crystal/src/spec/example.cr:45:13 in 'internal_run'
         from /usr/share/crystal/src/spec/example.cr:33:16 in 'run'
         from /usr/share/crystal/src/spec/context.cr:18:23 in 'internal_run'
         from /usr/share/crystal/src/spec/context.cr:339:7 in 'run'
         from /usr/share/crystal/src/spec/context.cr:18:23 in 'internal_run'
         from /usr/share/crystal/src/spec/context.cr:156:7 in 'run'
         from /usr/share/crystal/src/spec/dsl.cr:220:7 in '->'
         from /usr/share/crystal/src/crystal/at_exit_handlers.cr:14:19 in 'run'
         from /usr/share/crystal/src/crystal/main.cr:50:5 in 'exit'
         from /usr/share/crystal/src/crystal/main.cr:45:5 in 'main'
         from /usr/share/crystal/src/crystal/main.cr:127:3 in 'main'
         from /lib/x86_64-linux-gnu/libc.so.6 in '??'
         from /lib/x86_64-linux-gnu/libc.so.6 in '__libc_start_main'
         from /home/jeremy/.cache/crystal/crystal-run-spec.tmp in '_start'
         from ???
       

Aborted!
Finished in 86.19 milliseconds
3 examples, 0 failures, 3 errors, 0 pending

Failed examples:

crystal spec spec/time_series_spec.cr:22 # Redis::TimeSeries(Runnable) creates a TimeSeries key
crystal spec spec/time_series_spec.cr:49 # Redis::TimeSeries(Runnable) gets the last datapoint for a key
crystal spec spec/time_series_spec.cr:61 # Redis::TimeSeries(Runnable) gets a range for keys

This is from using master with Crystal 1.5.0 on Pop!_OS 22

@z64
Copy link

z64 commented Sep 13, 2022

These tests are for the full text search (ft) and time series modules (ts). They must be installed / available on the redis server you are connecting to.

@jwoertink
Copy link
Contributor Author

Ah, ok cool. In that case, I guess maybe in the README we could add some docs under the development section that has links or info on how to install these. I've never heard of either, so I'm not familiar with them.

@jgaskins
Copy link
Owner

Agreed, I've been trying to come up with a way to determine whether to run the specs for Cluster vs Client and haven't come up with anything good yet.

Ah, ok cool. In that case, I guess maybe in the README we could add some docs under the development section that has links or info on how to install these. I've never heard of either, so I'm not familiar with them.

@jwoertink If you use redis-stack-server for Homebrew or docker run redis/redis-stack-server, it comes with all those modules builtin. 👍🏼 on adding instructions to the README.

@jgaskins jgaskins mentioned this issue Sep 14, 2022
@jgaskins
Copy link
Owner

Specs are failing locally for me anyway because of some changes to Cluster, so I've added #23 so we can see when things break instead of relying on humans like me to run more than one spec file at a time. 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants