How to test cassandra DAOs in Quarkus - cassandra

I'd like to write some DAO-Tests in Quarkus for a cassandra database.
I googled this test framework: https://github.com/datastax/cassandra-quarkus/tree/main/test-framework
Now I have a problem, that I need to use a private docker container registry to pull images from.
But I have no idea how to configure the cassandra-quarkus-test-framework.
So did someone of you have an idea where to configure the URL of the docker registry in that framework?
Or do you have other ideas how to test Cassandra DAOs in Quarkus?
EDIT: Here is a working example project: https://github.com/edward-fakhouri/quarkus-cassandra-playground
Only the test class "CustomerDaoTest" is not working. Here I need some examples how to test the dao.
Thank you in advance for your help.

Well I have tested the cassanda-unit embedded database and it is working for Linux/Unix systems but not for Windows systems. So it won't work for testing the code while developing (in a windows os) but it will work, when running the tests in CI/CD environment. I'm only a bit happy with that solution.
Thanks #ozkanpakdil for suggesting this solution.

Related

Is it possible to scan IBM BPM code with sonarqube?

I need to scan IBM BPM code with sonarqube. But no clue whether sonarqube supports or not.
I don't think that's possible, for one thing. Sonarqube needs the code to be in a SCM in order to work. IBM BPM's code is saved in it's own proprietary repository. So yes, it's JS and theorically could be scanned by sonarqube, but the fact it's not accessible from outside the IDE makes it not scannable by sonarqube.

jhipster - how to load data from a database and show data?

I'm learning JHipster and a beginner (web developper).
Can someone show me step by step for loading data in a database (h2 or mysql or oracle) within JHipster application and showing to the home page?
Thanks in advance,
First, you should look at the jhipster documentation to generate an app : see this 12 minute video tutorial
Jhipster actually does a lot for you, it generates the back-end with your classes, logging, database interfacing ... But also creates a nice-looking front-end for you.
Next you should have a database up and running. In the choices you have mentioned, I think Mysql could be the most interesting for a beginner as you would have a good visibility on your database (h2 is mostly in memory, I use it for testing on my app) and the install should be simple enough.
In order to do that, you could use docker or install it manually.
For docker, you just have to type the following command :
docker run -p 3306:3306 --name mysql_instance_01 -e MYSQL_ROOT_PASSWORD=pass -d mysql
And then if you want to stop it :
docker stop mysql_instance_01
See the docker documentation for more information about install and usage : this link
To connect and administrate your database graphically, you can use dbeaver, it is free and easy to use.
Once you have generated the app and the database is running, you have different options : either you add your 'entities' and manually populate your database, or you create an SQL script to do it for you (Which is specific to the database you're using).
JHipster is using liquibase which will automatically translate the entities created in Jhipster into your database.
This is a short introduction, I strongly advise you read the jhipster documentation. For example, this video shows what Jhipster can do and how to use it.
Hope this helps.
You can read this link, a basic jhipster example

Check if nw.js application is running on built version (prod) or development

I am using grunt to build my application, I want to use different configurations when the application is being run from built version and when I run it as a developer using simply nw.
Is there any such option which helps distinguish this behaviour?
You will need to set the desired configuration IN the processed source. There are many ways to accomplish this. Check out this blog post for some ideas http://addyosmani.com/blog/environment-specific-builds-with-grunt-gulp-or-broccoli/

How to deploy custom DataCacheStoreProvider for write-through and read-behind on Azure

Is it possible to deploy custom DataCacheStoreProviders on Azure? I'm currently trying to deploy and test one locally, but I'm not sure how to go about this because the documentation doesn't cover my scenario. Any help would be appreciated.
No it not possible.
You can find all supported features here : http://msdn.microsoft.com/en-us/library/windowsazure/gg278350.aspx
I think your question is specific to cloud Service, isn't it?
I don't have exact experience on how to get all of that working however during one similar discussion the outcome was that you can use DataCacheStoreProviders with Azure if after building and register DataCacheStoreProviders in your machine, you can access them using Windows Azure Cache modules i.e. using DataCacheFactory.GetCache(String cacheName) and process cache items. IF you try and met any problem in any step I can find some ways to help you after you post your issue.

Fitnesse RestFixture on Linux

I've been using the RestFixture in Fitnesse to test a REST service which is running under Tomcat. When Fitnesse is run on Linux (Redhat to be precise) the fixture doesn't pass any querystrings to Tomcat (the log entries prove this). However, the exact same fixture running through Fitnesse on a Windows machine works as expected.
Has anyone else tried this combination of operating system and fixture and had any experiences that may help?
Alternatively does anyone know of any good ways of bulk-testing REST services (in a way that a non-developer can create new tests).
Any help would be greatly appreciated!
I've just run across what appears to be this issue myself. I haven't tried on Windows but RestFixture is fairly definitely not populating my query parameters.
In fact, there's an issue on the RestFixture list about it.
the one described was in fact a bug. It is fixed in the trunk and it will be available in the next release coming at the end of April 09.

Resources