Hello everyone, I developed service (based on our use case) on top of elasticsearch node client. For the testing of service, I wrote some functional tests, in those tests, I perform the following steps:
- Create an index
- Insert a document in the index
- Pull the inserted document back from the index
These tests run in ubuntu docker container environment details are given below:
LSB Version: core-9.20170808ubuntu1-noarch:printing-9.20170808ubuntu1-noarch:security-9.20170808ubuntu1-noarch
Distributor ID: Ubuntu
Description: Ubuntu 18.04.1 LTS
Release: 18.04
Codename: bionic
Installed elasticsearch's inside the docker container:
"version" : {
"number" : "6.5.4",
"build_flavor" : "default",
"build_type" : "deb",
"build_hash" : "d2ef93d",
"build_date" : "2018-12-17T21:17:40.758843Z",
"build_snapshot" : false,
"lucene_version" : "7.5.0",
"minimum_wire_compatibility_version" : "5.6.0",
"minimum_index_compatibility_version" : "5.0.0"
},
ISSUE
I faced an issue in step 3 when I pull data from an index because elastic search takes almost 1 second time to make the data available.
While the same tests run on my local machine without any issue, my current system is version is:
LSB Version: | core-9.20170808ubuntu1-noarch:printing-9.20170808ubuntu1-noarch:security-9.20170808ubuntu1-noarch |
---|---|
Distributor ID: | Ubuntu |
Description: | Ubuntu 18.04.1 LTS |
Release: | 18.04 |
Codename: | bionic |
Question
Is this issue caused by the docker container environment?