Floating License: Wait for license

Class library usage, coding and language questions.
hschmitt
Posts: 3
Joined: Tue Feb 15, 2011 3:56 pm

Floating License: Wait for license

Post by hschmitt » Tue Feb 15, 2011 4:26 pm

Hi,
we are using Ronarex with floating license model.
Hudson as CI Server executes our Ranorex NUnit tests on several machine configurations.
If there is no license available the test fails and the build is marked as "failed".
Is there a way to wait (C# or within NAnt) for our test execution until a license becomes available?

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: Floating License: Wait for license

Post by Support Team » Wed Feb 16, 2011 8:18 am

Hi,
hschmitt wrote:Is there a way to wait (C# or within NAnt) for our test execution until a license becomes available?
Sorry but this is not possible at the moment. The only public property for the License is the Ranorex.Core.ElementEngine.IsLicnesed, but i think this won't help you out.

But is it not possible in Hudson to start the executable on a specific time?
Then i would use this property to start your executable successive.

Regards,
Peter
Ranorex Team
.
Image

hschmitt
Posts: 3
Joined: Tue Feb 15, 2011 3:56 pm

Re: Floating License: Wait for license

Post by hschmitt » Wed Feb 16, 2011 5:42 pm

Support Team wrote:Hi,
hschmitt wrote:Is there a way to wait (C# or within NAnt) for our test execution until a license becomes available?
Sorry but this is not possible at the moment. The only public property for the License is the Ranorex.Core.ElementEngine.IsLicnesed, but i think this won't help you out.

But is it not possible in Hudson to start the executable on a specific time?
Then i would use this property to start your executable successive.

Regards,
Peter
Ranorex Team
Sure it is possible to start each OS we want to test at a specific time, but if there is no license left, the build fails. And we have to start it again manually.
But could a seperate executable an option with code like this

Code: Select all

while(!Ranorex.Core.ElementEngine.IsLicensed && timeoutNotReached) {
  try {
    //Ranorex Operation that triggers license check
  } catch(Exception e) {
    //Wait a bit
    continue;
  }
  break;
}
Which operation would you suggest? It should be one, that never fails when a valid license is available.

User avatar
artur_gadomski
Posts: 207
Joined: Mon Jul 19, 2010 6:55 am
Location: Copenhagen, Denmark
Contact:

Re: Floating License: Wait for license

Post by artur_gadomski » Thu Feb 17, 2011 9:17 am

It would be nice feature if Ranorex could hold and wait for floating licence to become available.
We could specify a timeout and frequency of checks.

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: Floating License: Wait for license

Post by Support Team » Thu Feb 17, 2011 9:31 am

Hi,

I talked to our lead developer for licensing and he told me, this is only working with node locked licenses. So your code above won't work. But I will add a feature request to our internal bug tracking system and in a future release of Ranorex there will be a method or a option in our UI to set this flag.

Regards,
Peter
Ranorex Team
.
Image

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: Floating License: Wait for license

Post by Support Team » Wed Apr 13, 2011 2:59 pm

We will add the feature to wait for a valid license to become available with Ranorex V3.0.2 in terms of the ElementEngine.WaitForValidLicense method.

Regards,
Alex
Ranorex Team
.
Image