This commit is contained in:
lucio 2024-02-22 12:22:41 +01:00
parent 50c646a8fb
commit a6552698f8
5 changed files with 20 additions and 7 deletions

View File

@ -10,5 +10,18 @@
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" output="target/classes" path="src/main/java">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" output="target/test-classes" path="src/test/java">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
<attribute name="test" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="target/classes"/>
</classpath>

View File

@ -22,7 +22,7 @@
<dependency>
<groupId>org.gcube.distribution</groupId>
<artifactId>gcube-bom</artifactId>
<version>3.0.0</version>
<version>3.0.1-SNAPSHOT</version>
<type>pom</type>
<scope>import</scope>
</dependency>

View File

@ -32,7 +32,7 @@ public final class Key {
private Key(String name, Query<?> query) {
this.name = name;
this.query = query;
this.scope = SecretManagerProvider.instance.get().getContext();
this.scope = SecretManagerProvider.get().getContext();
}
@Override

View File

@ -97,7 +97,7 @@ public class AsyncProxyDelegate<S> implements ProxyDelegate<S> {
*/
public <V> Future<V> makeAsync(final Call<S, V> call, ExecutorService service) throws RejectedExecutionException {
final Secret secret = SecretManagerProvider.instance.get();
final Secret secret = SecretManagerProvider.get();
// create task from call
Callable<V> callTask = new Callable<V>() {
@ -105,7 +105,7 @@ public class AsyncProxyDelegate<S> implements ProxyDelegate<S> {
@Override
public V call() throws Exception {
SecretManagerProvider.instance.set(secret);
SecretManagerProvider.set(secret);
return inner.make(call);
}

View File

@ -106,7 +106,7 @@ public class AsyncDelegateTest {
public void asyncCallsExecuteInCallScope() throws Exception {
final String scope = "a/b/c";
SecretManagerProvider.instance.set(new Secret() {
SecretManagerProvider.set(new Secret() {
@Override
@ -137,7 +137,7 @@ public class AsyncDelegateTest {
Answer<?> checkingScope= new Answer<Object>() {
@Override
public Object answer(InvocationOnMock invocation) throws Throwable {
assertEquals(scope,SecretManagerProvider.instance.get().getContext());
assertEquals(scope,SecretManagerProvider.get().getContext());
return value;
}
};
@ -171,7 +171,7 @@ public class AsyncDelegateTest {
public void asyncCallsAreInterrupted() throws Exception {
final String scope = "a/b/c";
SecretManagerProvider.instance.set(new Secret() {
SecretManagerProvider.set(new Secret() {
@Override