Integration Testing with Payara Micro

It should go without saying that in any piece of development testing is important.

While unit testing can (and should) be used to test the individual components which make up a piece of software, there always comes a point where the software has to have a set of integration tests ran. Mocking of components can allow code to be tested in isolation, however if overdone all that has been achieved is testing the mocks. Integration tests should be ran in as close to a realistic deployment as possible, as the more differences which exist between the test environment and a production deployment, the more scope there is for bugs to slip through. Testing of a deployed component makes getting code coverage metrics more difficult than in regular unit tests, but is still possible.

Frameworks such as the Jersey Test Framework can allow unit testing of JAX-RS REST endpoints that have been created, but this is not equivalent to a truly deployed component and so features such as CDI and the MicroProfile features I am looking into cannot easily be tested this way. While not related to MicroProfile, testing of DAO code is another area which has traditionally been an integration approach, as it required a running database server, but there are now libraries available that can allow this to be tested as unit tests.

» Continue reading


Publishing to Nexus

I have a Nexus 3 server running on my internal network which I was using for testing some performance related things, which were relying on the Payara Micro feature that enables it to deploy artifacts from Maven coordinates directly.

What I wanted to do was to have my local machine know where to publish build artifacts, but not have the details of this server published in the publicly available pom file as it is not relevant to anyone except myself. Usually the server URLs are stored in the distributionManagement section of the POM file.

» Continue reading


Plex, Docker, and the problem of always appearing as "Remote"

I have no idea when exactly this issue started happening, but for a while now I have been noticing that when I attempted to play media through the Plex application on my Xbox One it would default to transcoding down to a lower quality. While this was an annoyance, I could always manually set the quality back to original quality.

Finally this week I spent a bit of time to try and work out why.

The Problem

It appears that the majority of Plex clients on my network were considering the server to be a “remote” server, and so were setting bandwidth restrictions on playback. It is worth noting that there are two types of settings at play here, in the Xbox Plex application, and the bandwidth settings in the Plex Server settings which are available to Plex Pass subscribers.

» Continue reading


Eclipse MicroProfile

The Eclipse MicroProfile project has been evolving over the last few years, but only in the last month or so have I started taking a proper look into it.

The mission of the project is described to provide:

An open forum to optimize Enterprise Java for a microservices architecture by innovating across multiple implementations and collaborating on common areas of interest with a goal of standardization.

microprofile.io

The collection of framework specifications which are included in this standard, when used along with JAX-RS, provides the pieces required to build applications in a modern “microservices” architecture, while leaving behind more legacy aspects (and bloat) of the Java EE specification.

» Continue reading


Pi-hole, Conditional Forwarding, and Unifi Networking

In my start of the year post, I had given up with attempting to get Pi-hole to work as a DHCP server while in a docker container and had started using “isc-dhcp-server”. The main driver to having Pi-hole performing DHCP was so that in the dashboard I could see actual hostnames as opposed to the IP addresses of the clients. Instead of persevering with trying to get DHCP working in the Pi-hole container, I took advantage of changes I was making in my home network setup.

» Continue reading