Executing command on Cassandra test container #436
-
Hi, Code is basicly like following : ` Container = new TestcontainersBuilder() Container.StartAsync().ConfigureAwait(false).GetAwaiter().GetResult(); var createKeySpaceCommand = Container.ExecAsync(createKeySpaceCommand.Split("###").ToList()).ConfigureAwait(false).GetAwaiter() |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
It's almost always the same. Usually, it's not enough to just wait for the port. The port is available before the container or the service, in that case Cassandra is ready. Use a custom wait strategy to determine when the service is running. E. g. for PostgreSQL it looks like #412. Here is another example for azure-cosmos-emulator. For Cassandra, you could wait for a specific log message or something else. Please add more information in the future to your question or discussion. What have you already tried? What error do you get? etc. |
Beta Was this translation helpful? Give feedback.
It's almost always the same. Usually, it's not enough to just wait for the port. The port is available before the container or the service, in that case Cassandra is ready. Use a custom wait strategy to determine when the service is running.
E. g. for PostgreSQL it looks like #412. Here is another example for azure-cosmos-emulator. For Cassandra, you could wait for a specific log message or something else.
Please add more information in the future to your question or discussion. What have you already tried? What error do you get? etc.