Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Open Subsurface Data Universe Software
Platform
System
Notification
Commits
0bfab1d9
Commit
0bfab1d9
authored
Oct 21, 2021
by
Rucha Deshpande
Browse files
remove print stms
parent
49c710ce
Changes
3
Hide whitespace changes
Inline
Side-by-side
notification-core/src/main/java/org/opengroup/osdu/notification/service/SubscriptionHandler.java
View file @
0bfab1d9
...
...
@@ -32,9 +32,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.stereotype.Component
;
import
java.io.IOException
;
import
java.util.Iterator
;
import
java.util.List
;
import
java.util.Map
;
@Component
public
class
SubscriptionHandler
{
...
...
@@ -66,18 +64,6 @@ public class SubscriptionHandler {
}
private
String
querySubscriptionAndUpdateCache
(
String
notificationId
)
throws
AppException
,
SubscriptionException
{
System
.
out
.
println
(
"**********TESTING ISTIO PRINTING ALL HEADERS*************"
);
Map
<
String
,
String
>
tempheaders
=
headers
.
getHeaders
();
Iterator
<
String
>
itr
=
tempheaders
.
keySet
().
iterator
();
while
(
itr
.
hasNext
())
{
System
.
out
.
println
(
itr
.
next
());
}
tempheaders
.
entrySet
().
forEach
(
entry
->
{
System
.
out
.
println
(
entry
.
getKey
()
+
" "
+
entry
.
getValue
());
});
System
.
out
.
println
(
"**********TESTING ISTIO PRINTING ALL HEADERS done*************"
);
ISubscriptionService
service
=
subscriptionFactory
.
create
(
headers
);
List
<
Subscription
>
subscriptionList
=
service
.
query
(
notificationId
);
...
...
provider/notification-aws/src/main/java/org/opengroup/osdu/notification/provider/aws/impl/AwsPubsubRequestBodyExtractor.java
View file @
0bfab1d9
...
...
@@ -112,8 +112,7 @@ public class AwsPubsubRequestBodyExtractor implements IPubsubRequestBodyExtracto
throw
new
AppException
(
HttpStatus
.
BAD_REQUEST
.
value
(),
INVALID_PUBSUB_MESSAGE
,
"No tenant information from pubsub message."
);
}
String
x_user_id
=
request
.
getHeader
(
"x-user-id"
);
System
.
out
.
println
(
"*******x_user_id from original request****=="
+
x_user_id
);
String
x_user_id
=
request
.
getHeader
(
"x-user-id"
);
lowerCase
.
put
(
"x-user-id"
,
x_user_id
);
content
.
setAttributes
(
lowerCase
);
...
...
testing/notification-test-aws/src/test/java/org/opengroup/osdu/notification/api/TestPubsubEndpointHMAC.java
View file @
0bfab1d9
...
...
@@ -90,8 +90,6 @@ public class TestPubsubEndpointHMAC extends PubsubEndpointHMACTests {
private
void
createResourceInPartition
(
String
partitionId
)
throws
Exception
{
System
.
out
.
println
(
"****NOTIFICATION Creating resource using overriden method*******"
);
Map
<
String
,
String
>
headers
=
new
HashMap
<>();
headers
.
put
(
DpsHeaders
.
DATA_PARTITION_ID
,
partitionId
);
headers
.
put
(
DpsHeaders
.
AUTHORIZATION
,
testUtils
.
getOpsToken
());
...
...
@@ -99,12 +97,11 @@ public class TestPubsubEndpointHMAC extends PubsubEndpointHMACTests {
headers
.
put
(
"x-user-id"
,
AwsConfig
.
getAWSCognitoUser
());
DpsHeaders
dpsHeaders
=
DpsHeaders
.
createFromMap
(
headers
);
awssubscriptionService
=
awsfactory
.
create
(
dpsHeaders
);
System
.
out
.
println
(
"****NOTIFICATION Created subscriptionService using following headers*******"
);
Map
<
String
,
String
>
h
=
dpsHeaders
.
getHeaders
();
System
.
out
.
println
(
h
);
System
.
out
.
println
(
"****NOTIFICATION Created subscriptionService using following headers DONE*******"
);
//Create a new subscription to pub/sub
Subscription
subscription
=
new
Subscription
();
subscription
.
setName
(
"subscription-integration-test-hmac"
);
...
...
@@ -119,14 +116,10 @@ public class TestPubsubEndpointHMAC extends PubsubEndpointHMACTests {
subscription
.
setSecret
(
secret
);
try
{
Subscription
subscriptionCreated
=
awssubscriptionService
.
create
(
subscription
);
System
.
out
.
println
(
"**** SUBSCRIPTION CREATE HERE=*******"
);
notificationId
=
subscriptionCreated
.
getNotificationId
();
subscriptionId
=
subscriptionCreated
.
getId
();
System
.
out
.
println
(
"****subscriptionCreated.getPushEndpoint() subscriptionCreated.getPushEndpoint(); === "
+
subscriptionCreated
.
getPushEndpoint
());
System
.
out
.
println
(
"**** notificationId CREATE HERE=notificationId === "
+
notificationId
);
System
.
out
.
println
(
"**** SUBSCRIPTION CREATE HERE=subscriptionId === "
+
subscriptionId
);
System
.
out
.
println
(
"**** SUBSCRIPTION CREATE HERE DONE*******"
);
Config
.
Instance
().
NotificationId
=
notificationId
;
}
catch
(
SubscriptionException
e
){
System
.
out
.
println
(
"Subscription exception inner response : "
+
e
.
getHttpResponse
());
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment