[jbosstools-issues] [JBoss JIRA] (JBIDE-15766) openshift-java-client: don't refresh env variables on each addition/removal

Martes Wigglesworth (JIRA) jira-events at lists.jboss.org
Tue Oct 29 14:33:01 EDT 2013


    [ https://issues.jboss.org/browse/JBIDE-15766?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12825380#comment-12825380 ] 

Martes Wigglesworth edited comment on JBIDE-15766 at 10/29/13 2:32 PM:
-----------------------------------------------------------------------

I neglected to update this chain with the conversation that we had last week.

The instance(s) that are depicted above are not the issue from my comment description.
The issue is that in the complimentary integration test case, where you should not be able to remove a non-existing element, the call the IEnvironmentVariable.destroy() twice does not do anything, and causes the fail("should have thrown an exception") test case result.

So from what I have already indicated, and this information, it is determined that no real work is done on the list in the model, and hence there is a bit of a lack of mechanics in the java client. 

I have a possible solution, on which I am working and which should be ready for code review by Saturday 02-NOV-2013. (Friday, but to be safe I listed Saturday)

I have been working on finishing up the JBIDE-15744 update, because I see use for it in the design changes for this topic.  I am adding it as a dependency, however, if the current dependency is not clear, I will provide a more verbose description of the problem set, and solution in my next comment.
                
      was (Author: mwigglesworth-redhat):
    I have been working on finishing up the JBIDE-15744 update, because I see use for it in the design changes for this topic.  I am adding it as a dependency, however, if the current dependency is not clear, I will provide a more verbose description of the problem set, and solution in my next comment.
                  
> openshift-java-client: don't refresh env variables on each addition/removal
> ---------------------------------------------------------------------------
>
>                 Key: JBIDE-15766
>                 URL: https://issues.jboss.org/browse/JBIDE-15766
>             Project: Tools (JBoss Tools)
>          Issue Type: Bug
>          Components: openshift
>    Affects Versions: 4.1.1.Beta1, 4.2.0.Alpha1
>            Reporter: Andre Dietisheim
>            Assignee: Andre Dietisheim
>             Fix For: 4.1.1.Beta1, 4.2.0.Alpha1
>
>
> When adding/removing environment variables, the openshift-java-client would always request the backend for the full list. This should not be required and avoided
> {code:title=ApplicationResource#addEnvironmentVariable}
> 		EnvironmentVariableResourceDTO environmentVariableResourceDTO =
> 				new AddEnvironmentVariableRequest().execute(name, value);
> 		IEnvironmentVariable environmentVariable = new EnvironmentVariableResource(environmentVariableResourceDTO, this);
> 		updateEnvironmentVariables();
> 		return environmentVariable;
> {code}
> {code:title=ApplicationResource#updateEnvironmentVariables}
> 	protected void updateEnvironmentVariables() throws OpenShiftException {
> 		if (environmentVariableByName == null) {
> 			environmentVariableByName = loadEnvironmentVariables();
> 		} else {
> 			environmentVariableByName.clear();
> 			environmentVariableByName.putAll(loadEnvironmentVariables());
> 		}
> 	}
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the jbosstools-issues mailing list