File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -72,17 +72,19 @@ public function test(){
72
72
$ counter
73
73
);
74
74
75
+ // Check that the token will not be updated until a refresh time
75
76
$ session ->query ('select 1 as res ' );
76
- self ::assertEquals (
77
- $ token ,
78
- MetaGetter::getMeta ($ session )["x-ydb-auth-ticket " ][0 ]
79
- );
80
77
self ::assertEquals (
81
78
1 ,
82
79
$ counter
83
80
);
81
+ self ::assertEquals (
82
+ $ token ,
83
+ MetaGetter::getMeta ($ session )["x-ydb-auth-ticket " ][0 ]
84
+ );
84
85
85
- usleep (2e6 );
86
+ // Check that sdk used old token when failed refreshing
87
+ usleep (2 *1000 *1000 ); // waiting 2 seconds
86
88
$ session ->query ('select 1 as res ' );
87
89
self ::assertEquals (
88
90
2 ,
@@ -92,6 +94,8 @@ public function test(){
92
94
$ token ,
93
95
MetaGetter::getMeta ($ session )["x-ydb-auth-ticket " ][0 ]
94
96
);
97
+
98
+ // Check that token refreshed
95
99
$ session ->query ('select 1 as res ' );
96
100
self ::assertEquals (
97
101
3 ,
You can’t perform that action at this time.
0 commit comments