Writings.

  1. build-test-data plugin: how to generate IDs for domain entities in a batch

    I have faced an inssue on grails project: domain entities has assigned id, so in tests I have to manually set up id for every created entity: new Entity(id: id_value, ...).save() It is very verbose and creates additional task to create and maintain id variable. In addition, there…

    grails groovy build-test-plugin ID batch

  2. Typecasting in SQL could force database does not take into account index or sort column

    I faced this issue while working with Redshift. But it can be found in any SQL database engine. Redshift is known as special column database, that allows run query in parallel way that to distribution and sort key. Of course, the most widely used sort key is date and should…

    sql redshift timestamp postgres casting

  3. Crafting architecture solution at tech interview

    From time to time at technical interviews, your can face with architecture tasks. The main aim of such tasks to find out your ability to create scalable and solid solutions with attention to bottlenecks. Moreover, such task gives an opportunity to understand of your outlook with modern tools and frameworks.…

    interview architecture high-load scalability amazon services

  4. Continuous integration for Spring Boot app using Codeship + Openshift

    I have already talked about CI using pair Codeship + Openshift and I like such combination. Recently, I have started a new project based on spring boot and faced an issue, that Openshift does not provide an out-of-box pattern to run Spring Boot application. Spring boot application could be built in…

    Openshift java Spring boot Codeship continuous-integration CI

  5. Mocking method with wildcard generic return type

    There are several cases where construction when().thenReturn is not suitable during Unit tests. One of then generic return type. I have faced such issue, let's take a look. There is a method in interface declaration: public interface FooInterface { public Iterable<? extends SomeClass> getList(); ... } Implementation looks like this:…

    mockito java junit doReturn generic wildcard