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

Java e2e collection controller #163

Merged
merged 36 commits into from
Jun 20, 2018
Merged

Conversation

jenow
Copy link
Contributor

@jenow jenow commented Jun 14, 2018

What does this PR do ?

e2e tests for JAVA Collection controller

How should this be manually tested?

cd internal/wrappers/features/java
gradle cucumber

Other changes

Bug fixes

@codecov-io
Copy link

codecov-io commented Jun 14, 2018

Codecov Report

Merging #163 into 1.x will increase coverage by 0.09%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##              1.x     #163      +/-   ##
==========================================
+ Coverage   88.93%   89.02%   +0.09%     
==========================================
  Files         244      244              
  Lines        4409     4409              
==========================================
+ Hits         3921     3925       +4     
+ Misses        456      452       -4     
  Partials       32       32
Impacted Files Coverage Δ
realtime/join.go 78.37% <0%> (+5.4%) ⬆️
realtime/subscribe.go 77.14% <0%> (+5.71%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1178873...07d6130. Read the comment docs.

Copy link
Member

@etrousset etrousset left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As a general feedback, I would say that steps should be more specific, especially actions, to avoid having to depend on context and be reusable in other scenarios.

see inline comments for examples.

And the collection has a document with id 'my-document-id'
And the collection has a document with id 'my-document-id2'
When I truncate the collection
Then it should be empty
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this step could be more specific to avoid collisions with other scenarios

for example: Then the collection 'test-collection' shall be empty

And it has a collection 'test-collection2'
When I list the collections
Then I should have 2 collections

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could go further in the test:
Then the result contains 2 hits
And the list le list has 'test-collection1' and 'test-collection2'

And there is an index 'list-test-index'
And it has a collection 'test-collection1'
And it has a collection 'test-collection2'
When I list the collections
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When I list the collections of index 'list-test-index'

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

when we do the scenario
And there is an index 'list-test-index'
we should save the index inside a world object and then use it in scenario like
When I list the collections

@jenow jenow removed the blocked label Jun 19, 2018
Copy link
Contributor

@eric-trousset eric-trousset left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Avoid generic step that do not give explicit arguments of what is being tested. Always given the index and/ or the collection or the document id being tested so that it's easier to read and and maintain

@alexandrebouthinon alexandrebouthinon merged commit c3367cb into 1.x Jun 20, 2018
@alexandrebouthinon alexandrebouthinon deleted the KZL-113-java-e2e-collection branch June 20, 2018 11:41
@jenow jenow mentioned this pull request Sep 10, 2018
scottinet pushed a commit that referenced this pull request Sep 11, 2018
* fix

* deploy on bintray

* wip

* symbolic link of io/kuzzle/sdk to src/main/java

* clean io folder

* force ln

* dynamically load .so and publish on bintray according to the architecture

* fix path in Makefile

* fix mkdir

* execute gradlew with sh

* fix Makefile

* update readme

* fix readme

* change java.library.path of cucumber

* rename void_result to error_result

* remove io folder on clean

* build cpp build

* compile missing sources

* do a go get before making core

* compile right sources for cpp

* cpp sdk test: phase 0

* build cucumber-cpp as cmake external project

* removed cucumber.wire file

* added build script to build cpp e2e tests

* small fixes...debuging

* added cucumber.wire config file

* fix updateSelf

* fix return in getCurrentUser cpp

* change cucumber timeout

* raised cucumber 'invoke' timeout

* fixed build: fixed tests weren't building anymore

cucumber-cpp changed their build, introduicing the need for another
include path to ensure we can find new generated header CukeExport.hpp

* remove pointers type on KuzzleError

* fix tests

* new e2e scenarios

* e2e test on auth controller for java + fixes

* more passings tests

* e2e tests on realtime

* fix unit test

* build: workaround to avoid having to launch build twice

* tests: added logout test

* fix test.py

* fix test.py

* remove comments

* added dependencie to python-dev

* add python to the all rule

* update README

* fix readme

* Update README.md

* add C++11 deependencie

* add cppflags

* add cppflags

* remove libraries

* change meta

* fix Makefile

* add python-dev as dependency

* add -y to apt

* add python3-dev as dependency

* use pkg-config

* add g++6 as dependency

* add g++6 as dependency

* wip

* remove auto

* remove auto

* remove auto

* csharp sdk

* update readme

* add mono-mcs dependency

* Remove pointer type on KuzzleError (#153)

* remove pointers type on KuzzleError

* add namespace

* c# namespace

* c# namespace

* update test

* update Makefile

* fix Makefile

* feature files: split feature files by tested feature

* change module name

* Update kuzzlesdk.h

removed const long

* enhance clean rule

* finalize e2e test

* update README

* wip

* wip

* wip

* csharp sdk for windows

* fix Makefile

* added gradlew scripts

* fix Makefile

* fix Makefile

* wip

* fixes from PR comments

* java e2e tests with fixes

* fix unit test

* java e2e test on index controller

* Launch Java SDK tests on CodePipeline (#146)

* Launch Java SDK tests on CodePipeline

Add Continuous Integration with CodePipeline running E2E and Unit Tests
for all languages

To manually test this branch :

- Choose .codepipeline/builds/*.yml matching your machine architecture and
replay all the steps.
- Go check CodePipeline last build status and logs on AWS

Other :
- Fix paths in `internal/wrappers/features/run*.sh` for CI environment.


* Add helper scripts
* Update codepipeline config

* java e2e collection controller

* fix tests

* wip

* wip

* fixes from PR comments

* fixes from pr

* fix from pr's comment

* fix CMakeLists.txt

* typo

* add header

* Fix C++ test execution

* Fix typos in test scripts
* Automatically change the testing kuzzle hostname according to the test execution environment (CI / dev machine)
* Add README.md directives

Add Continuous Integration with CodePipeline running E2E and Unit Tests
for all languages

To manually test this branch :

- Choose .codepipeline/build*.yml matching your machine architecture and
replay all the steps.
- Go check CodePipeline last build status and logs on AWS

Other :
- Fix paths in `internal/wrappers/features/run*.sh` for CI environment.

fix kuzzleio/kuzzle-backlog#232

Merge remote-tracking branch 'origin/java-deploy' into test-automation

Merge remote-tracking branch 'origin/1.x' into test-automation

Merge remote-tracking branch 'origin/java-deploy' into test-automation

Merge remote-tracking branch 'origin/1.x' into test-automation

Update codepipeline config

Fix hostname in step defs c++

Fix

Limit resources use

fix tests script c++

* Java e2e index controller (#162)

* fixes from pr's comments

* fixes from pr's comments

* fixes from pr's comments

* update swig for travis

* update travis.yml

* update swig binary in Makefile

* update Makefile

* update Makefile

* update Makefile

* update Makefile

* update Makefile

* update Makefile

* update Makefile

* update Makefile

* run tests in docker

* fix makefile

* fix cpp build

* fix build cpp

* Java e2e collection controller (#163)

* java e2e collection controller

* fix from pr's comment

* fixes from pr's comments

* fixes from pr's comments

* fixes from pr's comments

* update swig for travis

* update travis.yml

* update swig binary in Makefile

* update Makefile

* update Makefile

* update Makefile

* update Makefile

* update Makefile

* update Makefile

* update Makefile

* update Makefile

* run tests in docker

* fix makefile

* fix makefile

* fix cpp build

* fix build cpp

* fix scenario

* Update Travis CI (#166)

* Update Travis CI

* Clean test.sh
* Process Isolation using Docker images
* Include Wrappers E2E Tests

* Remove containers kill

* Collection first and second scenario

* e2e test of realtime controller in cpp sdk (#168)

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* realtime e2e cpp

* fix memleak

* set refs to null

* comment content of kuzzle-sdk-steps

* fix

* fix

* fix

* KZL-114 : [C++] Index controller tests (#167)

* KZL-114 : [C++] Index controller tests
* Add regexp
* Put index steps in separate file
* Add BOOST_FAIL in exceptions

* Add steps for collection

* add running specific feature file

* pass options to create document

* update readme cpp sdk

* Updates for PR

* wip

* build for android

* add jar rule

* generate aar file including the so for arm abi

* wip

* fix return value for document controller (#171)

* wip

* add a max retry to connect

* Fix index#list to return the indexes list

* add java tests

* uncomment

* wip

* embed .so file in .jar file

* fix tests

* Fix collection tests

* Add document test (#170)

* wip

* wip

* wip

* fix mget

* remove debug

* remove debug

* uncomment

* Updates for PR

* remove reset of context values

* fix typo

* Add snapshot stage skeleton

* Add snapshot script and stage

* Improve travis.yml syntax

* Apply @scottinet requested changes

* build for android

* fix docker image name

* fix make java

* fix tests

* add gradlew

* fix tests

* add gradle

* fix tests

* fix tests

* Rename struct members for java getter/setter (#179)

* update copyright information

* rename docker image

* Change the type pf options.offline_mode (#180)

* add a mapping argument to existing collection.create methods

* oopsie

* Rename deprecated method ReplayQueue to PlayQueue (#182)

* Rename ReplayQueue to PlayQueue

* Replace --mount by -v (Docker)

* Fix functional tests

* typo

* Build android AAR SDK (#178)

* build for android

* add jar rule

* generate aar file including the so for arm abi

* build for android

* fix docker image name

* fix make java

* fix tests

* add gradlew

* fix tests

* add gradle

* rename docker image

* change build order

* working listener

* wrap document

* fix e2e tests

* fixes

* wrap Auth controller

* wrap collection controller

* typo

* typo

* Wrap Server controller for Android SDK (#189)

* wrap server controller

* add typemap for std::string*

* Add queryOptions when needed on Realtime controller's methods (#190)

* add queryOptions when needed in realtime controller

* added reference

* [KZL-275] Add Android build stage in Codepipeline

* Throw only possible exception in controller Index, Collection and Kuzzle object (#192)

* Add PluginImplementation + ExternalService errors

* WIP explicit exceptions

* Add explicit exceptions for Index, Collection and Kuzzle

* fix merge

* fix methods sig

* remove java templates

* [KZL-372] Add namespace kuzzleio for C structs (#187)

* [KZL-372] Fix namespace kuzzleio in C++

Co-Authored-By: Kévin Blondel <kblondel@kaliop.com>

* [KZL-372] Apply @scottinet requested changes

* [Fix] Change some char* to const char* (#194)

* [Fix] Change some char* to const char*

* Wrap Realtime controller for Android SDK (#191)

* add references to string parameters

* add queryOptions when needed in realtime controller

* added reference

* wrap realtime controller

* fix subscribe return value

* Wrap Listeners for android (#195)

* wrap EventListener

* wrap SubscribeListener

* wrap NotificationListener

* wrapped listeners

* fix test

* add namespace

* Remove autoconnect (#197)

* Remove connect from options struct

* Remove defaultIndex from options struct

* Remove default_index from destructors

* now use C++11

* port android listeners

* wrap of std::function

* fix C++ build

* update g++ to 4.9

* fix travis.yml

* add C++11 support to NDK compilation

* fix exceptions wrapping

* fix exceptions

* fix cpp tests

* use lambda in cpp tests and enable C++11 in cmake

* use lambda in e2e cpp tests

* fix tests

* Add custom WebviewClient (#196)

* add custom webviewclient

* pass Event as ref

* fix wrap

* fix wrap

* typemap for Event&

* remove unessessary code

* revert

* fix signatures

* fix signatures

* fix cpp test

* add

* fix from PR's comment

* use static_cast
@jenow jenow mentioned this pull request Jun 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants