Backend Development 13 min read

Tencent Testing Engineer Interview Experience and Technical Q&A

This article shares a detailed account of a Tencent testing engineer interview, covering self‑introduction, Go knowledge, Redis performance, distributed lock implementation, semaphore mechanics, RPC vs HTTP, concurrency usage, Git security practices, Linux commands, and a few brain‑teaser and algorithm questions.

IT Services Circle
IT Services Circle
IT Services Circle
Tencent Testing Engineer Interview Experience and Technical Q&A

Many candidates consider backend positions too competitive and turn to testing roles without knowing how to prepare; the interview process for testing is similar to backend, requiring standard questions, project discussion, and algorithm problems.

Problem Record

Self‑introduction

Brief.

Do you know Go? The department mainly uses Go.

Answer: studied it before, can refresh within a week.

Project Q&A: Using Redis to improve QPS – what if client requests exceed capacity?

Answer: Use rate‑limiting such as token bucket; if token unavailable, pause or retry, possibly queue requests and monitor for memory overflow.

Project Q&A: Encountered Redis concurrency issues?

Answer: Discussed flash‑sale coupon competition, introduced distributed lock using Redisson.

Project Q&A: How is the distributed lock implemented?

Mutual exclusion via SETNX .

Re‑entrancy using a hash structure {threadID}=>{lockCount} to track lock count per thread.

Automatic renewal via a watchdog thread that periodically extends lock expiration.

Automatic retry by spinning when lock acquisition fails.

Dead‑lock prevention by setting lock expiration.

Project Q&A: What does a watchdog thread do?

It periodically extends the lock to prevent premature release while the business logic is running.

Project Q&A: If the business thread dies but the watchdog keeps renewing, what happens?

Use try‑catch‑finally to guarantee lock release; alternatively, define a maximum execution time and stop renewal after that, reporting the issue.

How does a semaphore work?

It maintains a count of available resources and a waiting queue; P operation decrements the count and may block, V operation increments and may wake a waiting thread.

Why use RPC when HTTP exists?

RPC provides richer exception information, avoids redundant HTTP status codes, and is more suitable for internal service‑to‑service communication, while HTTP is geared toward browser‑server interactions.

What is the underlying principle of Go’s map?

Not answered; the interviewee referred to Java’s HashMap , which uses an array combined with linked lists or red‑black trees to resolve hash collisions.

Do you use concurrency in code?

Yes, a thread pool is used in the project.

Git usage and handling of sensitive data?

Store secrets in local configuration files (e.g., docker‑compose referencing a .ini file) and reference them via environment variables like $MYSQL_PASSWORD to avoid committing them to the repository.

Testing development practices?

Write and design test cases.

Develop testing tools.

Linux command experience?

File operations: mv , mkdir , cd , ls

Docker: docker container ls , docker ps -a

Permissions: chmod , chown , useradd , groupadd

Networking: netstat , ip , addr

Testing connectivity: ping , telnet

Intelligence puzzle

Four lights inside a room, four switches outside; determine which switch controls each light with only one entry.

Solution: Turn on first switch, wait, turn it off and turn on second switch, then enter the room; the lit light belongs to the second switch, the warm but off light to the first, and the remaining two lights are mapped to the third and fourth switches by testing one of them.

Algorithm question

Find the most frequent character in a 100 k‑character lowercase article – solution: count frequencies, sort, output the top character.

Reflection

Feelings: some answers were unclear, project details were fuzzy.

Weaknesses: lacked approach for the intelligence puzzle, need more practice.

backendRPCRedisGoSemaphoreInterviewDistributed Lock
IT Services Circle
Written by

IT Services Circle

Delivering cutting-edge internet insights and practical learning resources. We're a passionate and principled IT media platform.

0 followers
Reader feedback

How this landed with the community

login Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.