testmycode / testmycode/tmc-server

Investigate possible test bug occurring around midnight

Open
#260 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Ruby
Stars
51
Forks
42
Avg merge
1h 27m
Merged PRs (30d)
1

Description

Investigate possible test bug occurring around midnight

  1. Exercise should be submittable by non-administrators only if the deadline has not passed and the exercise is not hidden and is published
    Failure/Error: Unable to find matching line from backtrace
    expected #<Exercise id: 184, name: "exercise127", created_at: "2015-06-01 21:45:30", updated_at: "2015-06-01 21:45:30", course_id: 202, publish_time: "2015-06-01 21:00:00", gdocs_sheet: "exercise155", hidden: false, returnable_forced: true, checksum: "", solution_visible_after: nil, has_tests: false, deadline_spec: nil, unlock_spec: nil, runtime_params: "[]", valgrind_strategy: nil, code_review_requests_enabled: false, run_tests_locally_action_enabled: true>.submittable_by?(#<User id: 156, login: "user287", password_hash: "bd135f372a1a9fafc1c4d17176f6a3c6920c2172c68dbbfa45...", created_at: "2015-06-01 21:45:30", updated_at: "2015-06-01 21:45:30", salt: "3ba9963223ffd2bce9166570377c40e41e1520b7f7f57f389d...", administrator: false, email: "user344@example.com", legitimate_student: true>) to return false, got true
    # /home/tmc/tmc-server/spec/models/exercise_spec.rb:182:in `block (2 levels) in <top (required)>'

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with spec/models/exercise_spec.rb:182 and run the failing exercise submittability example, paying attention to its behavior around midnight. Trace Exercise#submittable_by? and the deadline-related setup to determine whether the test timing or the implementation is responsible; done means the source of the failure is identified and the behavior is covered reliably.

Written by the indexing model from the issue text.

Assessment

Tech stack
ruby
Domain
testing-qa
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.