Skip to content

Test Assignment for MoP - spring-webflux, project-reactor and r2dbc

Notifications You must be signed in to change notification settings

rdrmic/mop-test-assignment

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Preparing the database

There is a script 'ddl.sql' in project root for creating DB / tables. Connection string, username and password are in application.properties.

Running the application

There are 2 profiles in project: 'dev' (default) and 'mock'. And since Maven is already included in project, they should be run with

  • mvnw spring-boot:run
  • mvnw spring-boot:run -Pmock

Difference is that 'mock' itself serves a small quantity of data via MockController (in the mock package), and by calling 'Task 1's endpoint could be seen how response timeouts are handled, because the mocked endpoint creates delays, and on 2 endpoints repeatedly returns HTTP 408 response statuses.

Default profile fetches data from endpoints listed in the specification.

Endpoints

Console logging

There are 2 switches (on/off) in application.properties that toggle WebFlux's internal logging: 'log.webclient' and 'log.r2dbc'. They are initialy off, but they could be switched on to see more clearly what is happening regarding threads, asynchronicity and non-blocking nature of the implementation.

Releases

No releases published

Packages

No packages published

Languages