Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Z
zircon
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Iterations
Wiki
Requirements
Jira
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ensembl-gh-mirror
zircon
Commits
330bdef9
Commit
330bdef9
authored
6 years ago
by
Thibaut Hourlier
Browse files
Options
Downloads
Patches
Plain Diff
Test if the object is defined before returning values
parent
d5c25b3f
No related branches found
No related tags found
2 merge requests
!1
Fix precedence problem by replacing or with ||
,
!1
Fix precedence problem by replacing or with ||
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
bin/zircon_pipe
+10
-4
10 additions, 4 deletions
bin/zircon_pipe
t/timestamp.t
+3
-0
3 additions, 0 deletions
t/timestamp.t
with
13 additions
and
4 deletions
bin/zircon_pipe
+
10
−
4
View file @
330bdef9
...
...
@@ -3,6 +3,7 @@
use
strict
;
use
warnings
;
use
Carp
;
use
IO::
Handle
;
use
Getopt::
Long
;
use
Tk
;
...
...
@@ -129,8 +130,10 @@ sub zconn {
(
$self
->
{
zconn
})
=
@arg
;
$self
->
try_send
;
# may have been postponed due to lack of zconn
}
return
$self
->
{
zconn
}
||
die
"
Need zconn set now
";
if
(
!
$self
->
{
zconn
})
{
confess
"
Need zconn set now
";
}
return
$self
->
{
zconn
};
}
...
...
@@ -261,8 +264,11 @@ sub new {
sub
zconn
{
my
(
$self
,
@arg
)
=
@_
;
(
$self
->
{
zconn
})
=
@arg
if
@arg
;
return
$self
->
{
zconn
}
||
die
"
Need zconn set now
";
if
(
!
$self
->
{
zconn
})
{
confess
"
Need zconn set now
";
}
return
$self
->
{
zconn
};
}
sub
on_timeout
{
...
...
This diff is collapsed.
Click to expand it.
t/timestamp.t
+
3
−
0
View file @
330bdef9
...
...
@@ -19,6 +19,7 @@ sub main {
plan
tests
=>
7
;
my
$handler
=
do_init
();
# hold the ref to prevent garbage collection
print
STDERR
"
AARRRGGG
\n
";
MainLoop
();
return
0
;
...
...
@@ -31,9 +32,11 @@ sub do_init {
$M
->
clip_ids
(
@id
);
$M
->
after
(
10000
,
sub
{
fail
("
whole-test timeout
");
$M
->
destroy
});
print
STDERR
"
GGG
\n
";
my
$handler
=
init_zircon_conn
(
$M
,
@id
);
$M
->
state_bump
(
new
=>
@id
);
print
STDERR
"
RRRGGG
\n
";
return
$handler
;
}
...
...
This diff is collapsed.
Click to expand it.
Preview
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!
Save comment
Cancel
Please
register
or
sign in
to comment