Pact provider verification is not calling provider-states - pact

I have followed the examples on https://github.com/pact-foundation/pact-net#verifying-a-provider using version 4.0.0. My problem is that tests are failing because the provider state is not being set up. In the logs I see no mention of the /provider-states url being called and when I debug, the only call to ProviderStateMiddleware.InvokeAsync is for the actual API call. I can prove my test is passing by forcing the provider state setup in the constructor.

I found my issue. I was missing .Given(“some state”) in my consumer test.

Related

Finding status if MDB is running

I want to use mbeans on startup of j2ee application to check if all the MDBs are running and jms specification has been activated.
Any pointers will be very helpful
The only way I know of to do this would be to use the ServerEndpointControl MBean. This is a Liberty specific MBean for controlling the input sources for work into the runtime. This can also be used to get status on http listeners.
The best place to find the Javadoc for the MBean is here. To find out if an MBean is running you call the isPaused method providing the MDB name which is defined as:
ApplicationName#ModuleName#BeanName
if the MDB is running it'll return false.

Value of "WL.Client.Push" is coming as undefined

I am getting the value for WL.Client.Push as undefined when launching the application. Hence, the below is coming as false.
if(WL.Client.Push)
And that's the reason my push is not getting registered.
Please advise how can I define WL.Client.Push.
This normally happens when you try to use WL.Client.* APIs before the SDK initialization has been completed.
The right point to start using the WL.Client APIs is after the flow has entered the wlCommonInit() method.
Do note that IBM MobileFoundation 7.x is out of support, and you should move to MobileFoundation 8.0.
You can use MFPPush object to invoke Push APIs.
Documentation here.
A working sample can be found here.

PasswordSignInAsync - Failing when calling this programmatically?

Please help, I want to test a service method - and during this testing I want to forcefully log-in a user by providing the user name and password - this will not be used for production, simply for a test I am conducting. But when I get the sign in manager and call the PasswordSignInAsync I receive a strange error, this error is not generated when going via Login.cshtml.cs code which reads the same?

Spring-boot, how to curl or create rest endpoint for sentry DSN

I am using spring-boot-1.4.0. In my project i am using sentry for logging, sometimes log events are not reflected in sentry.While browsing google about this issue i saw something called "Raven-Sentry" but it was written using Python. Is there any Raven-sentry available for spring-boot.I am using following Raven-callback but still I am unsure how to curl or create a rest endpoint which would let me know the status of sentry whether it is up or down. Please let me know for any more details even i am ready to provide a code samples if needed.
Your help should be appreciable.
As per Brett comments I have updated my question by providing Python Sentry connection test link:
Python-sentry-test
In the above link they are running the test to find out connection to sentry is successful or not. Similarly i want to check the connection to sentry is successful or not via spring-boot.Also i would like to add sentry status to health check, so that when ever my logging events are not reflected in sentry, immediately i will flip the health of sentry to down.

Getting "Resource not found error" while using Azure File Sync

Facing a very strange issue.
Following this guide https://azure.microsoft.com/en-in/documentation/articles/app-service-mobile-xamarin-forms-blob-storage/ to implement File Sync in Xamarin Forms app.
The Get method in my service (GetUser, default get method in App service controller) is being called thrice & on the 3rd iteration it gives me a 404 resource not found error. First 2 iterations work fine.
This is the client call
await userTable.PullAsync(
null,
userTable.Where(x => x.Email == userEmail), false, new System.Threading.CancellationToken(), null);
If I remove the following line,
// Initialize file sync
this.client.InitializeFileSyncContext(new TodoItemFileSyncHandler(this), store);
then the code works just fine, without any errors.
I will need some time doing a sample project, meanwhile if anyone can shed some light, it will be of help.
Thanks
This won't be an answer, because there isn't enough information to go on. When you get a 404, it's because the backend returned a 404. The ideal situation is:
Turn on Diagnostic Logging in the Azure Portal for your backend
Use Fiddler to monitor the requests
When the request causes a 404, look at what is actually happening
If you are using an ASP.NET backend (and I'm assuming you are because all the File tutorials use ASP.NET), then you can set a breakpoint on the appropriate method in the backend and follow it through. You will need to deploy a debug version of your code.
this is sorted now, eventually I had to give it what it was asking for. I had to create a storage controller for User too, although I don't need one as I don't need to save any files in storage against the users.
I am testing the app further now to see if this sorts my problem completely or I need a storage controller for every entity I use in my app.
In which case it will be really odd as I don't intend to use the storage for all my entities.

Resources